fix(server): prevent creation of empty antennas

This commit is contained in:
syuilo 2023-03-15 18:09:00 +09:00
parent a8bd3e8e53
commit 63068fc0c2
2 changed files with 5 additions and 0 deletions

View file

@ -41,6 +41,7 @@ You should also include the user name that made the change.
- Bookwyrmのユーザーのプロフィールページで「リモートで表示」をタップしても反応がない問題を修正
- `disableCache: true`を設定している場合に絵文字管理操作でエラーが出る問題を修正
- リテンション分析が上手く機能しないことがあるのを修正
- 空のアンテナが作成できないように修正
## 13.9.2 (2023/03/06)

View file

@ -79,6 +79,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
private globalEventService: GlobalEventService,
) {
super(meta, paramDef, async (ps, me) => {
if (ps.keywords.length === 0) {
throw new Error('invalid param');
}
const currentAntennasCount = await this.antennasRepository.countBy({
userId: me.id,
});