fix: a few lint problems

This commit is contained in:
Mar0xy 2023-09-22 23:03:39 +02:00
parent 1795195097
commit 8d2f655e51
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
2 changed files with 4 additions and 4 deletions

View file

@ -214,7 +214,7 @@ export class NoteEditService implements OnApplicationShutdown {
if (!editid) { if (!editid) {
throw new Error('fail'); throw new Error('fail');
}; }
const oldnote = await this.notesRepository.findOneBy({ const oldnote = await this.notesRepository.findOneBy({
id: editid, id: editid,
@ -222,11 +222,11 @@ export class NoteEditService implements OnApplicationShutdown {
if (oldnote == null) { if (oldnote == null) {
throw new Error('no such note'); throw new Error('no such note');
}; }
if (oldnote.userId !== user.id) { if (oldnote.userId !== user.id) {
throw new Error('not the author'); throw new Error('not the author');
}; }
// チャンネル外にリプライしたら対象のスコープに合わせる // チャンネル外にリプライしたら対象のスコープに合わせる
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで) // (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)

View file

@ -366,7 +366,7 @@ export function getNoteMenu(props: {
text: i18n.ts.edit, text: i18n.ts.edit,
danger: true, danger: true,
action: edit, action: edit,
}: undefined, } : undefined,
{ {
icon: 'ti ti-edit', icon: 'ti ti-edit',
text: i18n.ts.deleteAndEdit, text: i18n.ts.deleteAndEdit,