diff --git a/src/services/exploration.service.ts b/src/services/exploration.service.ts index d9f5112eaf73e65d6d7aa4f6edd79573f61cec3a..84f916c3fe96a891ef0d9f1e78bfff5ed4ba1efc 100644 --- a/src/services/exploration.service.ts +++ b/src/services/exploration.service.ts @@ -54,17 +54,13 @@ export default class ExplorationService { * @throws {Error} */ public async deleteAllExplorationEntities(): Promise<boolean> { - try { - const explorations = await this.getAllExplorationEntities() - if (!explorations) return true + const explorations = await this.getAllExplorationEntities() + if (explorations) { for (let index = 0; index < explorations.length; index++) { await this._client.destroy(explorations[index]) } - return true - } catch (err) { - console.log(err) - throw err } + return true } /** diff --git a/src/services/quiz.service.ts b/src/services/quiz.service.ts index 9829f19b89e6eb9087cf050ebf0a3df490d7465c..db1cc9a9a8e04367e2df39eb47efcc207455249a 100644 --- a/src/services/quiz.service.ts +++ b/src/services/quiz.service.ts @@ -62,17 +62,13 @@ export default class QuizService { * @throws {Error} */ public async deleteAllQuizEntities(): Promise<boolean> { - try { - const quizzes = await this.getAllQuizEntities() - if (!quizzes) return true + const quizzes = await this.getAllQuizEntities() + if (quizzes) { for (let index = 0; index < quizzes.length; index++) { await this._client.destroy(quizzes[index]) } - return true - } catch (err) { - console.log(err) - throw err } + return true } /**