copy changes to notes/edit.ts

This commit is contained in:
Hazelnoot 2025-04-01 10:55:56 -04:00
parent e37c2611f7
commit fffa6c97fe
2 changed files with 4 additions and 6 deletions

View file

@ -240,11 +240,11 @@ export class NoteEditService implements OnApplicationShutdown {
});
if (oldnote == null) {
throw new UnrecoverableError('edit failed: missing oldnote');
throw new UnrecoverableError(`edit failed for ${editid}: missing oldnote`);
}
if (oldnote.userId !== user.id) {
throw new UnrecoverableError(`edit failed for ${oldnote.id}: user is not the note author`);
throw new UnrecoverableError(`edit failed for ${editid}: user is not the note author`);
}
// we never want to change the replyId, so fetch the original "parent"

View file

@ -31,13 +31,11 @@ export const meta = {
res: {
type: 'object',
optional: false,
nullable: false,
optional: false, nullable: false,
properties: {
createdNote: {
type: 'object',
optional: false,
nullable: false,
optional: false, nullable: false,
ref: 'Note',
},
},