0
0
Fork 0

non-null制約引っかかって死ぬ問題の対処

This commit is contained in:
Xeltica 2020-09-16 01:23:51 +09:00
parent ba711025d7
commit 6ac1919b38
2 changed files with 3 additions and 6 deletions

View file

@ -1,7 +1,4 @@
import { api } from '../services/misskey';
import { config } from '../config'; import { config } from '../config';
import { User } from '../models/entities/user';
import { updateUser } from './users';
import { Score } from '../types/Score'; import { Score } from '../types/Score';
export const format = (score: Score): string => `昨日のMisskeyの活動は export const format = (score: Score): string => `昨日のMisskeyの活動は

View file

@ -9,8 +9,8 @@ export const updateScore = async (user: User): Promise<void> => {
} }
await updateUser(user.username, user.host, { await updateUser(user.username, user.host, {
prevNotesCount: miUser.notesCount, prevNotesCount: miUser.notesCount ?? 0,
prevFollowingCount: miUser.followingCount, prevFollowingCount: miUser.followingCount ?? 0,
prevFollowersCount: miUser.followersCount, prevFollowersCount: miUser.followersCount ?? 0,
}); });
}; };