SchemaTypeの型計算量を削減 (#8332)
* schema typeの型計算量を削減 * reduce some type error * wip * fix * clean up * more shrink
This commit is contained in:
@@ -10,20 +10,24 @@ export const meta = {
|
||||
kind: 'read:gallery-likes',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
items: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
post: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'GalleryPost',
|
||||
},
|
||||
},
|
||||
page: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'GalleryPost',
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
@@ -10,20 +10,23 @@ export const meta = {
|
||||
kind: 'read:page-likes',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
page: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'Page',
|
||||
},
|
||||
},
|
||||
page: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
ref: 'Page',
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
} as const;
|
||||
|
||||
@@ -47,5 +50,5 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||
.take(ps.limit)
|
||||
.getMany();
|
||||
|
||||
return await PageLikes.packMany(likes, user);
|
||||
return PageLikes.packMany(likes, user);
|
||||
});
|
||||
|
Reference in New Issue
Block a user