mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 21:14:32 +00:00
fix backend lint errors
This commit is contained in:
parent
9dffb13be7
commit
f9c1535147
13 changed files with 27 additions and 23 deletions
|
@ -77,7 +77,7 @@ type PackedPureRenote = PackedRenote & {
|
||||||
replyId: NonNullable<Packed<'Note'>['replyId']>;
|
replyId: NonNullable<Packed<'Note'>['replyId']>;
|
||||||
poll: NonNullable<Packed<'Note'>['poll']>;
|
poll: NonNullable<Packed<'Note'>['poll']>;
|
||||||
fileIds: NonNullable<Packed<'Note'>['fileIds']>;
|
fileIds: NonNullable<Packed<'Note'>['fileIds']>;
|
||||||
}
|
};
|
||||||
|
|
||||||
export function isRenotePacked(note: Packed<'Note'>): note is PackedRenote {
|
export function isRenotePacked(note: Packed<'Note'>): note is PackedRenote {
|
||||||
return note.renoteId != null;
|
return note.renoteId != null;
|
||||||
|
|
|
@ -161,4 +161,4 @@ export type ThinUser = {
|
||||||
|
|
||||||
export type ScheduleNotePostJobData = {
|
export type ScheduleNotePostJobData = {
|
||||||
scheduleNoteId: MiNote['id'];
|
scheduleNoteId: MiNote['id'];
|
||||||
}
|
};
|
||||||
|
|
|
@ -312,7 +312,9 @@ describe('ユーザー', () => {
|
||||||
assert.strictEqual(response.name, null);
|
assert.strictEqual(response.name, null);
|
||||||
assert.strictEqual(response.username, 'zoe');
|
assert.strictEqual(response.username, 'zoe');
|
||||||
assert.strictEqual(response.host, null);
|
assert.strictEqual(response.host, null);
|
||||||
response.avatarUrl && assert.match(response.avatarUrl, /^[-a-zA-Z0-9@:%._\+~#&?=\/]+$/);
|
if (response.avatarUrl) {
|
||||||
|
assert.match(response.avatarUrl, /^[-a-zA-Z0-9@:%._\+~#&?=\/]+$/);
|
||||||
|
}
|
||||||
assert.strictEqual(response.avatarBlurhash, null);
|
assert.strictEqual(response.avatarBlurhash, null);
|
||||||
assert.deepStrictEqual(response.avatarDecorations, []);
|
assert.deepStrictEqual(response.avatarDecorations, []);
|
||||||
assert.strictEqual(response.isBot, false);
|
assert.strictEqual(response.isBot, false);
|
||||||
|
|
|
@ -661,7 +661,9 @@ export async function captureWebhook<T = SystemWebhookPayload>(postAction: () =>
|
||||||
let timeoutHandle: NodeJS.Timeout | null = null;
|
let timeoutHandle: NodeJS.Timeout | null = null;
|
||||||
const result = await new Promise<string>(async (resolve, reject) => {
|
const result = await new Promise<string>(async (resolve, reject) => {
|
||||||
fastify.all('/', async (req, res) => {
|
fastify.all('/', async (req, res) => {
|
||||||
timeoutHandle && clearTimeout(timeoutHandle);
|
if (timeoutHandle) {
|
||||||
|
clearTimeout(timeoutHandle);
|
||||||
|
}
|
||||||
|
|
||||||
const body = JSON.stringify(req.body);
|
const body = JSON.stringify(req.body);
|
||||||
res.status(200).send('ok');
|
res.status(200).send('ok');
|
||||||
|
|
Loading…
Add table
Reference in a new issue