fix(server): prevent creation of empty antennas
This commit is contained in:
parent
a8bd3e8e53
commit
63068fc0c2
2 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue