upd: add backend for post editing
This commit is contained in:
parent
deb8f73127
commit
feec3c302b
16 changed files with 1310 additions and 2 deletions
49
packages/backend/src/models/json-schema/note-edit.ts
Normal file
49
packages/backend/src/models/json-schema/note-edit.ts
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
export const packedNoteEdit = {
|
||||
type: "object",
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
format: "id",
|
||||
example: "xxxxxxxxxx",
|
||||
},
|
||||
updatedAt: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
format: "date-time",
|
||||
},
|
||||
note: {
|
||||
type: "object",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
ref: "Note",
|
||||
},
|
||||
noteId: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
format: "id",
|
||||
},
|
||||
text: {
|
||||
type: "string",
|
||||
optional: true,
|
||||
nullable: true,
|
||||
},
|
||||
cw: {
|
||||
type: "string",
|
||||
optional: true,
|
||||
nullable: true,
|
||||
},
|
||||
fileIds: {
|
||||
type: "array",
|
||||
optional: true,
|
||||
nullable: true,
|
||||
items: {
|
||||
type: "string",
|
||||
format: "id",
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
|
@ -22,6 +22,11 @@ export const packedNoteSchema = {
|
|||
optional: true, nullable: true,
|
||||
format: 'date-time',
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'string',
|
||||
optional: true, nullable: true,
|
||||
format: 'date-time',
|
||||
},
|
||||
text: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue