enhance(backend): DBのコラム設定としてcreatedAtの値を入れるように/お知らせ機能API修正
This commit is contained in:
@@ -69,6 +69,10 @@ export const meta = {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
silence: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
isRead: {
|
||||
type: 'boolean',
|
||||
optional: true, nullable: false,
|
||||
@@ -86,10 +90,10 @@ export const paramDef = {
|
||||
icon: { type: 'string', enum: ['info', 'warning', 'error', 'success'], default: 'info' },
|
||||
display: { type: 'string', enum: ['normal', 'banner', 'dialog'], default: 'normal' },
|
||||
forExistingUsers: { type: 'boolean', default: false },
|
||||
silence: { type: 'boolean', default: false },
|
||||
needConfirmationToRead: { type: 'boolean', default: false },
|
||||
closeDuration: { type: 'number', default: 0 },
|
||||
displayOrder: { type: 'number', default: 0 },
|
||||
silence: { type: 'boolean', default: false },
|
||||
userId: { type: 'string', format: 'misskey:id', nullable: true, default: null },
|
||||
},
|
||||
required: ['title', 'text', 'imageUrl'],
|
||||
@@ -109,10 +113,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
icon: ps.icon,
|
||||
display: ps.display,
|
||||
forExistingUsers: ps.forExistingUsers,
|
||||
silence: ps.silence,
|
||||
needConfirmationToRead: ps.needConfirmationToRead,
|
||||
closeDuration: ps.closeDuration,
|
||||
displayOrder: ps.displayOrder,
|
||||
silence: ps.silence,
|
||||
userId: ps.userId,
|
||||
}, me);
|
||||
|
||||
|
@@ -79,6 +79,10 @@ export const meta = {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
silence: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
userId: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
@@ -128,13 +132,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
display: announcement.display,
|
||||
isActive: announcement.isActive,
|
||||
forExistingUsers: announcement.forExistingUsers,
|
||||
silence: announcement.silence,
|
||||
needConfirmationToRead: announcement.needConfirmationToRead,
|
||||
closeDuration: announcement.closeDuration,
|
||||
displayOrder: announcement.displayOrder,
|
||||
silence: announcement.silence,
|
||||
userId: announcement.userId,
|
||||
user: announcement.userInfo,
|
||||
reads: announcement.readCount,
|
||||
reads: announcement.reads,
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
@@ -35,10 +35,10 @@ export const paramDef = {
|
||||
icon: { type: 'string', enum: ['info', 'warning', 'error', 'success'] },
|
||||
display: { type: 'string', enum: ['normal', 'banner', 'dialog'] },
|
||||
forExistingUsers: { type: 'boolean' },
|
||||
silence: { type: 'boolean' },
|
||||
needConfirmationToRead: { type: 'boolean' },
|
||||
closeDuration: { type: 'number', default: 0 },
|
||||
displayOrder: { type: 'number', default: 0 },
|
||||
silence: { type: 'boolean' },
|
||||
isActive: { type: 'boolean' },
|
||||
},
|
||||
required: ['id'],
|
||||
@@ -66,10 +66,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
display: ps.display,
|
||||
icon: ps.icon,
|
||||
forExistingUsers: ps.forExistingUsers,
|
||||
silence: ps.silence,
|
||||
needConfirmationToRead: ps.needConfirmationToRead,
|
||||
closeDuration: ps.closeDuration,
|
||||
displayOrder: ps.displayOrder,
|
||||
silence: ps.silence,
|
||||
isActive: ps.isActive,
|
||||
}, me);
|
||||
});
|
||||
|
Reference in New Issue
Block a user