Skip to content

Commit

Permalink
merge ready
Browse files Browse the repository at this point in the history
  • Loading branch information
vsun757 committed Dec 14, 2023
1 parent 7da2b12 commit 3f2d7dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/repository/references-repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ReferenceRepository {

async create(data) {
// Create the document
const reference = new Reference(data);
const reference = new this.model(data);

// Save the document in the database
try {
Expand Down
12 changes: 8 additions & 4 deletions app/services/references-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@ class ReferencesService {
}

async retrieveAll(options) {
return this.repository.retrieveAll(options);
const res = await this.repository.retrieveAll(options);
return res;
}

async create(data) {
return this.repository.create(data);
const res = await this.repository.create(data);
return res;
}

async update(data) {
return this.repository.update(data);
const res = await this.repository.update(data);
return res;
}

async deleteBySourceName(sourceName) {
return this.repository.deleteBySourceName(sourceName);
const res = await this.repository.deleteBySourceName(sourceName);
return res;
}

}
Expand Down

0 comments on commit 3f2d7dc

Please sign in to comment.