fix lint
This commit is contained in:
@@ -15,11 +15,11 @@ export const meta = {
|
||||
|
||||
params: {
|
||||
name: {
|
||||
validator: $.str.range(1, 100)
|
||||
validator: $.str.range(1, 100),
|
||||
},
|
||||
|
||||
src: {
|
||||
validator: $.str.or(['home', 'all', 'users', 'list', 'group'])
|
||||
validator: $.str.or(['home', 'all', 'users', 'list', 'group']),
|
||||
},
|
||||
|
||||
userListId: {
|
||||
@@ -31,53 +31,53 @@ export const meta = {
|
||||
},
|
||||
|
||||
keywords: {
|
||||
validator: $.arr($.arr($.str))
|
||||
validator: $.arr($.arr($.str)),
|
||||
},
|
||||
|
||||
excludeKeywords: {
|
||||
validator: $.arr($.arr($.str))
|
||||
validator: $.arr($.arr($.str)),
|
||||
},
|
||||
|
||||
users: {
|
||||
validator: $.arr($.str)
|
||||
validator: $.arr($.str),
|
||||
},
|
||||
|
||||
caseSensitive: {
|
||||
validator: $.bool
|
||||
validator: $.bool,
|
||||
},
|
||||
|
||||
withReplies: {
|
||||
validator: $.bool
|
||||
validator: $.bool,
|
||||
},
|
||||
|
||||
withFile: {
|
||||
validator: $.bool
|
||||
validator: $.bool,
|
||||
},
|
||||
|
||||
notify: {
|
||||
validator: $.bool
|
||||
}
|
||||
validator: $.bool,
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchUserList: {
|
||||
message: 'No such user list.',
|
||||
code: 'NO_SUCH_USER_LIST',
|
||||
id: '95063e93-a283-4b8b-9aa5-bcdb8df69a7f'
|
||||
id: '95063e93-a283-4b8b-9aa5-bcdb8df69a7f',
|
||||
},
|
||||
|
||||
noSuchUserGroup: {
|
||||
message: 'No such user group.',
|
||||
code: 'NO_SUCH_USER_GROUP',
|
||||
id: 'aa3c0b9a-8cae-47c0-92ac-202ce5906682'
|
||||
}
|
||||
id: 'aa3c0b9a-8cae-47c0-92ac-202ce5906682',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
ref: 'Antenna',
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
@@ -15,22 +15,22 @@ export const meta = {
|
||||
params: {
|
||||
antennaId: {
|
||||
validator: $.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchAntenna: {
|
||||
message: 'No such antenna.',
|
||||
code: 'NO_SUCH_ANTENNA',
|
||||
id: 'b34dcf9d-348f-44bb-99d0-6c9314cfe2df'
|
||||
}
|
||||
}
|
||||
id: 'b34dcf9d-348f-44bb-99d0-6c9314cfe2df',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
const antenna = await Antennas.findOne({
|
||||
id: ps.antennaId,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (antenna == null) {
|
||||
|
@@ -14,9 +14,9 @@ export const meta = {
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
}
|
||||
ref: 'Antenna',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
|
@@ -23,7 +23,7 @@ export const meta = {
|
||||
|
||||
limit: {
|
||||
validator: $.optional.num.range(1, 100),
|
||||
default: 10
|
||||
default: 10,
|
||||
},
|
||||
|
||||
sinceId: {
|
||||
@@ -47,8 +47,8 @@ export const meta = {
|
||||
noSuchAntenna: {
|
||||
message: 'No such antenna.',
|
||||
code: 'NO_SUCH_ANTENNA',
|
||||
id: '850926e0-fd3b-49b6-b69a-b28a5dbd82fe'
|
||||
}
|
||||
id: '850926e0-fd3b-49b6-b69a-b28a5dbd82fe',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
@@ -57,15 +57,15 @@ export const meta = {
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note'
|
||||
}
|
||||
}
|
||||
ref: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
const antenna = await Antennas.findOne({
|
||||
id: ps.antennaId,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (antenna == null) {
|
||||
|
@@ -21,15 +21,15 @@ export const meta = {
|
||||
noSuchAntenna: {
|
||||
message: 'No such antenna.',
|
||||
code: 'NO_SUCH_ANTENNA',
|
||||
id: 'c06569fb-b025-4f23-b22d-1fcd20d2816b'
|
||||
id: 'c06569fb-b025-4f23-b22d-1fcd20d2816b',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
ref: 'Antenna',
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
|
@@ -18,11 +18,11 @@ export const meta = {
|
||||
},
|
||||
|
||||
name: {
|
||||
validator: $.str.range(1, 100)
|
||||
validator: $.str.range(1, 100),
|
||||
},
|
||||
|
||||
src: {
|
||||
validator: $.str.or(['home', 'all', 'users', 'list', 'group'])
|
||||
validator: $.str.or(['home', 'all', 'users', 'list', 'group']),
|
||||
},
|
||||
|
||||
userListId: {
|
||||
@@ -34,66 +34,66 @@ export const meta = {
|
||||
},
|
||||
|
||||
keywords: {
|
||||
validator: $.arr($.arr($.str))
|
||||
validator: $.arr($.arr($.str)),
|
||||
},
|
||||
|
||||
excludeKeywords: {
|
||||
validator: $.arr($.arr($.str))
|
||||
validator: $.arr($.arr($.str)),
|
||||
},
|
||||
|
||||
users: {
|
||||
validator: $.arr($.str)
|
||||
validator: $.arr($.str),
|
||||
},
|
||||
|
||||
caseSensitive: {
|
||||
validator: $.bool
|
||||
validator: $.bool,
|
||||
},
|
||||
|
||||
withReplies: {
|
||||
validator: $.bool
|
||||
validator: $.bool,
|
||||
},
|
||||
|
||||
withFile: {
|
||||
validator: $.bool
|
||||
validator: $.bool,
|
||||
},
|
||||
|
||||
notify: {
|
||||
validator: $.bool
|
||||
}
|
||||
validator: $.bool,
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchAntenna: {
|
||||
message: 'No such antenna.',
|
||||
code: 'NO_SUCH_ANTENNA',
|
||||
id: '10c673ac-8852-48eb-aa1f-f5b67f069290'
|
||||
id: '10c673ac-8852-48eb-aa1f-f5b67f069290',
|
||||
},
|
||||
|
||||
noSuchUserList: {
|
||||
message: 'No such user list.',
|
||||
code: 'NO_SUCH_USER_LIST',
|
||||
id: '1c6b35c9-943e-48c2-81e4-2844989407f7'
|
||||
id: '1c6b35c9-943e-48c2-81e4-2844989407f7',
|
||||
},
|
||||
|
||||
noSuchUserGroup: {
|
||||
message: 'No such user group.',
|
||||
code: 'NO_SUCH_USER_GROUP',
|
||||
id: '109ed789-b6eb-456e-b8a9-6059d567d385'
|
||||
}
|
||||
id: '109ed789-b6eb-456e-b8a9-6059d567d385',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Antenna'
|
||||
}
|
||||
ref: 'Antenna',
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
// Fetch the antenna
|
||||
const antenna = await Antennas.findOne({
|
||||
id: ps.antennaId,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (antenna == null) {
|
||||
|
Reference in New Issue
Block a user