enhance: api.jsonのレスポンスの内容を実際の内容に合わせる (#12723)
* Create packedAdSchema * admin/emoji/add * admin/get-user-ips * admin/roles/users * admin/get-index-stats * admin/accounts/find-by-email * fix type of admin/ad/list * federation/stats * endpoints * get-online-users-count * i/2fa/register-key * i/2fa/key-done * i/2fa/register * i/apps * i/authorized-apps * i/registry/get-all * i/registry/get * i/registry/get-detail * i/registry/key-with-type * i/registry/scopes-with-domain * i/update-email * i/move * i/webhooks/create * fix miss type * i/webhooks/show * i/webhooks/list * flash/create * roles/users * server-info * test * users/lists/get-memberships * users/achievements * fetch-rss * fetch-external-resources
This commit is contained in:
@@ -17,6 +17,12 @@ export const meta = {
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
res: {
|
||||
type: 'object',
|
||||
optional: false,
|
||||
nullable: false,
|
||||
ref: 'Ad',
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
@@ -63,7 +69,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
ad: ad,
|
||||
});
|
||||
|
||||
return ad;
|
||||
return {
|
||||
id: ad.id,
|
||||
expiresAt: ad.expiresAt.toISOString(),
|
||||
startsAt: ad.startsAt.toISOString(),
|
||||
dayOfWeek: ad.dayOfWeek,
|
||||
url: ad.url,
|
||||
imageUrl: ad.imageUrl,
|
||||
priority: ad.priority,
|
||||
ratio: ad.ratio,
|
||||
place: ad.place,
|
||||
memo: ad.memo,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user