Skip to content

Commit

Permalink
Rename notesSettings to noteSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaFomina committed Oct 21, 2023
1 parent 07ef322 commit 17913d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/presentation/http/router/note.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Note API', () => {
'content': null,
'createdAt': '2023-10-16T13:49:19.000Z',
'updatedAt': '2023-10-16T13:49:19.000Z',
'notesSettings': {
'noteSettings': {
'custom_hostname': 'codex.so',
'enabled': true,
'id': 1,
Expand Down
6 changes: 3 additions & 3 deletions src/repository/storage/postgres/orm/sequelize/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class NoteSequelizeStorage {
*/
this.model.hasOne(this.settingsModel, {
foreignKey: 'note_id',
as: 'notesSettings',
as: 'noteSettings',
});
}

Expand Down Expand Up @@ -217,11 +217,11 @@ export default class NoteSequelizeStorage {
*/
return await this.model.findOne({
where: {
'$notesSettings.custom_hostname$': hostname,
'$noteSettings.custom_hostname$': hostname,
},
include: {
model: this.settingsModel,
as: 'notesSettings',
as: 'noteSettings',
required: true,
},
});
Expand Down

0 comments on commit 17913d5

Please sign in to comment.