0
0
Fork 0
This commit is contained in:
xeltica 2021-09-05 10:50:35 +09:00
parent 2c2385ac59
commit d94f2c91fb
11 changed files with 160 additions and 30 deletions

View file

@ -1,18 +1,7 @@
import { config } from '../../config';
import { User } from '../models/entities/user';
import { Score } from '../../common/types/score';
/**
* 稿
*/
export const defaultTemplate = `昨日のMisskeyの活動は
: {notesCount}({notesDelta})
: {followingCount}({followingDelta})
:{followersCount}({followersDelta})
{url}`;
import { defaultTemplate } from '../../common/default-template';
/**
*

View file

@ -9,6 +9,7 @@ import { toSignedString } from './to-signed-string';
* @returns
*/
export const getScores = async (user: User): Promise<Score> => {
// TODO 毎回取ってくるのも微妙なので、ある程度キャッシュしたいかも
const miUser = await api<Record<string, number>>(user.host, 'users/show', { username: user.username }, user.token);
if (miUser.error) {
throw miUser.error;