fix lint
This commit is contained in:
parent
0abe2dfee0
commit
c69b72e199
573 changed files with 3318 additions and 3318 deletions
|
|
@ -25,12 +25,12 @@ export const meta = {
|
|||
},
|
||||
|
||||
text: {
|
||||
validator: $.optional.str.pipe(MessagingMessages.validateText)
|
||||
validator: $.optional.str.pipe(MessagingMessages.validateText),
|
||||
},
|
||||
|
||||
fileId: {
|
||||
validator: $.optional.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
|
|
@ -43,45 +43,45 @@ export const meta = {
|
|||
recipientIsYourself: {
|
||||
message: 'You can not send a message to yourself.',
|
||||
code: 'RECIPIENT_IS_YOURSELF',
|
||||
id: '17e2ba79-e22a-4cbc-bf91-d327643f4a7e'
|
||||
id: '17e2ba79-e22a-4cbc-bf91-d327643f4a7e',
|
||||
},
|
||||
|
||||
noSuchUser: {
|
||||
message: 'No such user.',
|
||||
code: 'NO_SUCH_USER',
|
||||
id: '11795c64-40ea-4198-b06e-3c873ed9039d'
|
||||
id: '11795c64-40ea-4198-b06e-3c873ed9039d',
|
||||
},
|
||||
|
||||
noSuchGroup: {
|
||||
message: 'No such group.',
|
||||
code: 'NO_SUCH_GROUP',
|
||||
id: 'c94e2a5d-06aa-4914-8fa6-6a42e73d6537'
|
||||
id: 'c94e2a5d-06aa-4914-8fa6-6a42e73d6537',
|
||||
},
|
||||
|
||||
groupAccessDenied: {
|
||||
message: 'You can not send messages to groups that you have not joined.',
|
||||
code: 'GROUP_ACCESS_DENIED',
|
||||
id: 'd96b3cca-5ad1-438b-ad8b-02f931308fbd'
|
||||
id: 'd96b3cca-5ad1-438b-ad8b-02f931308fbd',
|
||||
},
|
||||
|
||||
noSuchFile: {
|
||||
message: 'No such file.',
|
||||
code: 'NO_SUCH_FILE',
|
||||
id: '4372b8e2-185d-4146-8749-2f68864a3e5f'
|
||||
id: '4372b8e2-185d-4146-8749-2f68864a3e5f',
|
||||
},
|
||||
|
||||
contentRequired: {
|
||||
message: 'Content required. You need to set text or fileId.',
|
||||
code: 'CONTENT_REQUIRED',
|
||||
id: '25587321-b0e6-449c-9239-f8925092942c'
|
||||
id: '25587321-b0e6-449c-9239-f8925092942c',
|
||||
},
|
||||
|
||||
youHaveBeenBlocked: {
|
||||
message: 'You cannot send a message because you have been blocked by this user.',
|
||||
code: 'YOU_HAVE_BEEN_BLOCKED',
|
||||
id: 'c15a5199-7422-4968-941a-2a462c478f7d'
|
||||
id: 'c15a5199-7422-4968-941a-2a462c478f7d',
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
@ -119,7 +119,7 @@ export default define(meta, async (ps, user) => {
|
|||
// check joined
|
||||
const joining = await UserGroupJoinings.findOne({
|
||||
userId: user.id,
|
||||
userGroupId: recipientGroup.id
|
||||
userGroupId: recipientGroup.id,
|
||||
});
|
||||
|
||||
if (joining == null) {
|
||||
|
|
@ -131,7 +131,7 @@ export default define(meta, async (ps, user) => {
|
|||
if (ps.fileId != null) {
|
||||
file = await DriveFiles.findOne({
|
||||
id: ps.fileId,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (file == null) {
|
||||
|
|
|
|||
|
|
@ -16,28 +16,28 @@ export const meta = {
|
|||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 300,
|
||||
minInterval: ms('1sec')
|
||||
minInterval: ms('1sec'),
|
||||
},
|
||||
|
||||
params: {
|
||||
messageId: {
|
||||
validator: $.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchMessage: {
|
||||
message: 'No such message.',
|
||||
code: 'NO_SUCH_MESSAGE',
|
||||
id: '54b5b326-7925-42cf-8019-130fda8b56af'
|
||||
id: '54b5b326-7925-42cf-8019-130fda8b56af',
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
const message = await MessagingMessages.findOne({
|
||||
id: ps.messageId,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (message == null) {
|
||||
|
|
|
|||
|
|
@ -15,16 +15,16 @@ export const meta = {
|
|||
params: {
|
||||
messageId: {
|
||||
validator: $.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchMessage: {
|
||||
message: 'No such message.',
|
||||
code: 'NO_SUCH_MESSAGE',
|
||||
id: '86d56a2f-a9c3-4afb-b13c-3e9bfef9aa14'
|
||||
id: '86d56a2f-a9c3-4afb-b13c-3e9bfef9aa14',
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue