mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
copy changes to notes/edit.ts
This commit is contained in:
parent
e37c2611f7
commit
fffa6c97fe
2 changed files with 4 additions and 6 deletions
|
@ -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"
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue