fix: 🐛 prevent creation of empty antennas
This commit is contained in:
parent
ab19e68417
commit
5e85d0761e
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,11 @@ export const meta = {
|
||||||
code: "TOO_MANY_ANTENNAS",
|
code: "TOO_MANY_ANTENNAS",
|
||||||
id: "c3a5a51e-04d4-11ee-be56-0242ac120002",
|
id: "c3a5a51e-04d4-11ee-be56-0242ac120002",
|
||||||
},
|
},
|
||||||
|
noKeywords: {
|
||||||
|
message: "No keywords",
|
||||||
|
code: "NO_KEYWORDS",
|
||||||
|
id: "aa975b74-1ddb-11ee-be56-0242ac120002",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
|
@ -100,6 +105,7 @@ export const paramDef = {
|
||||||
|
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup);
|
if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup);
|
||||||
|
if (ps.keywords.length === 0) throw new ApiError(meta.errors.noKeywords);
|
||||||
let userList;
|
let userList;
|
||||||
let userGroupJoining;
|
let userGroupJoining;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue