From 7fcfd3808925dba3272f46d541a5c401ab1092e4 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 29 Jul 2024 13:07:57 +0200 Subject: [PATCH] Fix typo + add todo --- src/api/collections.js | 3 ++- src/api/jobs.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/collections.js b/src/api/collections.js index c86b4f6..287ff47 100644 --- a/src/api/collections.js +++ b/src/api/collections.js @@ -151,6 +151,7 @@ export default class Data { const limit = parseInt(req.query.limit, 10) || 10; const offset = parseInt(req.query.offset, 10) || 0; + // todo: migrate to ee.data.listImages? // Load the collection let ic = this.ee.ImageCollection(id); @@ -219,7 +220,7 @@ export default class Data { } // Limit - const icList = ic.toList(limit + 1, offset) + const icList = ic.toList(limit + 1, offset); // Retrieve the items let items; diff --git a/src/api/jobs.js b/src/api/jobs.js index 58e15d0..28ac637 100644 --- a/src/api/jobs.js +++ b/src/api/jobs.js @@ -143,7 +143,7 @@ export default class JobsAPI { token: req.params.token }; - await this.getJobRultsByQuery(query, true, req, res); + await this.getJobResultsByQuery(query, true, req, res); } async getJobResults(req, res) { @@ -153,7 +153,7 @@ export default class JobsAPI { _id: req.params.job_id, user_id: req.user._id }; - await this.getJobRultsByQuery(query, false, req, res); + await this.getJobResultsByQuery(query, false, req, res); } async deleteJobResults(req, res) { @@ -175,7 +175,7 @@ export default class JobsAPI { res.send(204); } - async getJobRultsByQuery(query, publish, req, res) { + async getJobResultsByQuery(query, publish, req, res) { const job = await this.storage.findJob(query); const partial = typeof req.query.partial !== 'undefined'; if (job.status === 'error') {