lint
This commit is contained in:
parent
1ed06e490c
commit
567c550120
13 changed files with 28 additions and 31 deletions
|
|
@ -25,7 +25,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
const ep = endpoints.find(x => x.name === ps.endpoint);
|
||||
if (ep == null) return null;
|
||||
return {
|
||||
params: Object.entries(ep.params.properties || {}).map(([k, v]) => ({
|
||||
params: Object.entries(ep.params.properties ?? {}).map(([k, v]) => ({
|
||||
name: k,
|
||||
type: v.type.charAt(0).toUpperCase() + v.type.slice(1),
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
|
||||
const mutedNotes = await this.notesRepository.find({
|
||||
where: [{
|
||||
id: note.threadId || note.id,
|
||||
id: note.threadId ?? note.id,
|
||||
}, {
|
||||
threadId: note.threadId || note.id,
|
||||
threadId: note.threadId ?? note.id,
|
||||
}],
|
||||
});
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
await this.noteThreadMutingsRepository.insert({
|
||||
id: this.idService.genId(),
|
||||
createdAt: new Date(),
|
||||
threadId: note.threadId || note.id,
|
||||
threadId: note.threadId ?? note.id,
|
||||
userId: me.id,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
});
|
||||
|
||||
await this.noteThreadMutingsRepository.delete({
|
||||
threadId: note.threadId || note.id,
|
||||
threadId: note.threadId ?? note.id,
|
||||
userId: me.id,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue