mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 22:49:24 +09:00
fix(backend): Play作成時Visibilityの設定が効かない問題を修正 (MisskeyIO#270)
This commit is contained in:
parent
41cd11bbf7
commit
61f3854c52
@ -39,6 +39,7 @@ export const paramDef = {
|
|||||||
permissions: { type: 'array', items: {
|
permissions: { type: 'array', items: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
} },
|
} },
|
||||||
|
visibility: { type: 'string', enum: ['public', 'private'] },
|
||||||
},
|
},
|
||||||
required: ['title', 'summary', 'script', 'permissions'],
|
required: ['title', 'summary', 'script', 'permissions'],
|
||||||
} as const;
|
} as const;
|
||||||
@ -61,6 +62,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
summary: ps.summary,
|
summary: ps.summary,
|
||||||
script: ps.script,
|
script: ps.script,
|
||||||
permissions: ps.permissions,
|
permissions: ps.permissions,
|
||||||
|
visibility: ps.visibility,
|
||||||
}).then(x => this.flashsRepository.findOneByOrFail(x.identifiers[0]));
|
}).then(x => this.flashsRepository.findOneByOrFail(x.identifiers[0]));
|
||||||
|
|
||||||
return await this.flashEntityService.pack(flash, me);
|
return await this.flashEntityService.pack(flash, me);
|
||||||
|
@ -42,6 +42,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const query = this.flashsRepository.createQueryBuilder('flash')
|
const query = this.flashsRepository.createQueryBuilder('flash')
|
||||||
.andWhere('flash.likedCount > 0')
|
.andWhere('flash.likedCount > 0')
|
||||||
|
.andWhere('flash.visibility = \'public\'')
|
||||||
.orderBy('flash.likedCount', 'DESC');
|
.orderBy('flash.likedCount', 'DESC');
|
||||||
|
|
||||||
const flashs = await query.limit(10).getMany();
|
const flashs = await query.limit(10).getMany();
|
||||||
|
@ -417,6 +417,7 @@ async function save() {
|
|||||||
summary,
|
summary,
|
||||||
permissions,
|
permissions,
|
||||||
script,
|
script,
|
||||||
|
visibility,
|
||||||
});
|
});
|
||||||
router.push('/play/' + created.id + '/edit');
|
router.push('/play/' + created.id + '/edit');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user