fix lint
This commit is contained in:
@@ -17,7 +17,7 @@ export const meta = {
|
||||
|
||||
params: {
|
||||
fileId: {
|
||||
validator: $.type(ID)
|
||||
validator: $.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -25,9 +25,9 @@ export const meta = {
|
||||
noSuchFile: {
|
||||
message: 'No such file.',
|
||||
code: 'MO_SUCH_FILE',
|
||||
id: 'fc46b5a4-6b92-4c33-ac66-b806659bb5cf'
|
||||
}
|
||||
}
|
||||
id: 'fc46b5a4-6b92-4c33-ac66-b806659bb5cf',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
@@ -51,14 +51,14 @@ export default define(meta, async (ps, me) => {
|
||||
await getConnection().queryResultCache!.remove(['meta_emojis']);
|
||||
|
||||
publishBroadcastStream('emojiAdded', {
|
||||
emoji: await Emojis.pack(emoji.id)
|
||||
emoji: await Emojis.pack(emoji.id),
|
||||
});
|
||||
|
||||
insertModerationLog(me, 'addEmoji', {
|
||||
emojiId: emoji.id
|
||||
emojiId: emoji.id,
|
||||
});
|
||||
|
||||
return {
|
||||
id: emoji.id
|
||||
id: emoji.id,
|
||||
};
|
||||
});
|
||||
|
@@ -17,7 +17,7 @@ export const meta = {
|
||||
|
||||
params: {
|
||||
emojiId: {
|
||||
validator: $.type(ID)
|
||||
validator: $.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -25,8 +25,8 @@ export const meta = {
|
||||
noSuchEmoji: {
|
||||
message: 'No such emoji.',
|
||||
code: 'NO_SUCH_EMOJI',
|
||||
id: 'e2785b66-dca3-4087-9cac-b93c541cc425'
|
||||
}
|
||||
id: 'e2785b66-dca3-4087-9cac-b93c541cc425',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
@@ -37,9 +37,9 @@ export const meta = {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'id',
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
@@ -72,10 +72,10 @@ export default define(meta, async (ps, me) => {
|
||||
await getConnection().queryResultCache!.remove(['meta_emojis']);
|
||||
|
||||
publishBroadcastStream('emojiAdded', {
|
||||
emoji: await Emojis.pack(copied.id)
|
||||
emoji: await Emojis.pack(copied.id),
|
||||
});
|
||||
|
||||
return {
|
||||
id: copied.id
|
||||
id: copied.id,
|
||||
};
|
||||
});
|
||||
|
@@ -14,17 +14,17 @@ export const meta = {
|
||||
params: {
|
||||
query: {
|
||||
validator: $.optional.nullable.str,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
|
||||
host: {
|
||||
validator: $.optional.nullable.str,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
|
||||
limit: {
|
||||
validator: $.optional.num.range(1, 100),
|
||||
default: 10
|
||||
default: 10,
|
||||
},
|
||||
|
||||
sinceId: {
|
||||
@@ -33,7 +33,7 @@ export const meta = {
|
||||
|
||||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
@@ -53,8 +53,8 @@ export const meta = {
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
@@ -71,10 +71,10 @@ export const meta = {
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
|
@@ -14,12 +14,12 @@ export const meta = {
|
||||
params: {
|
||||
query: {
|
||||
validator: $.optional.nullable.str,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
|
||||
limit: {
|
||||
validator: $.optional.num.range(1, 100),
|
||||
default: 10
|
||||
default: 10,
|
||||
},
|
||||
|
||||
sinceId: {
|
||||
@@ -28,7 +28,7 @@ export const meta = {
|
||||
|
||||
untilId: {
|
||||
validator: $.optional.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
@@ -48,8 +48,8 @@ export const meta = {
|
||||
optional: false as const, nullable: false as const,
|
||||
items: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const
|
||||
}
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
},
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
@@ -66,10 +66,10 @@ export const meta = {
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
|
@@ -14,17 +14,17 @@ export const meta = {
|
||||
|
||||
params: {
|
||||
id: {
|
||||
validator: $.type(ID)
|
||||
}
|
||||
validator: $.type(ID),
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchEmoji: {
|
||||
message: 'No such emoji.',
|
||||
code: 'NO_SUCH_EMOJI',
|
||||
id: 'be83669b-773a-44b7-b1f8-e5e5170ac3c2'
|
||||
}
|
||||
}
|
||||
id: 'be83669b-773a-44b7-b1f8-e5e5170ac3c2',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
@@ -37,6 +37,6 @@ export default define(meta, async (ps, me) => {
|
||||
await getConnection().queryResultCache!.remove(['meta_emojis']);
|
||||
|
||||
insertModerationLog(me, 'removeEmoji', {
|
||||
emoji: emoji
|
||||
emoji: emoji,
|
||||
});
|
||||
});
|
||||
|
@@ -13,29 +13,29 @@ export const meta = {
|
||||
|
||||
params: {
|
||||
id: {
|
||||
validator: $.type(ID)
|
||||
validator: $.type(ID),
|
||||
},
|
||||
|
||||
name: {
|
||||
validator: $.str
|
||||
validator: $.str,
|
||||
},
|
||||
|
||||
category: {
|
||||
validator: $.optional.nullable.str
|
||||
validator: $.optional.nullable.str,
|
||||
},
|
||||
|
||||
aliases: {
|
||||
validator: $.arr($.str)
|
||||
}
|
||||
validator: $.arr($.str),
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchEmoji: {
|
||||
message: 'No such emoji.',
|
||||
code: 'NO_SUCH_EMOJI',
|
||||
id: '684dec9d-a8c2-4364-9aa8-456c49cb1dc8'
|
||||
}
|
||||
}
|
||||
id: '684dec9d-a8c2-4364-9aa8-456c49cb1dc8',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
|
Reference in New Issue
Block a user