forked from mirrors/misskey
fix ogp rendering and refactor
This commit is contained in:
@@ -10,23 +10,23 @@ import mount from 'koa-mount';
|
||||
import koaLogger from 'koa-logger';
|
||||
import * as slow from 'koa-slow';
|
||||
|
||||
import activityPub from './activitypub.js';
|
||||
import nodeinfo from './nodeinfo.js';
|
||||
import wellKnown from './well-known.js';
|
||||
import { IsNull } from 'typeorm';
|
||||
import config from '@/config/index.js';
|
||||
import apiServer from './api/index.js';
|
||||
import fileServer from './file/index.js';
|
||||
import proxyServer from './proxy/index.js';
|
||||
import webServer from './web/index.js';
|
||||
import Logger from '@/services/logger.js';
|
||||
import { envOption } from '../env.js';
|
||||
import { UserProfiles, Users } from '@/models/index.js';
|
||||
import { genIdenticon } from '@/misc/gen-identicon.js';
|
||||
import { createTemp } from '@/misc/create-temp.js';
|
||||
import { publishMainStream } from '@/services/stream.js';
|
||||
import * as Acct from '@/misc/acct.js';
|
||||
import { envOption } from '../env.js';
|
||||
import activityPub from './activitypub.js';
|
||||
import nodeinfo from './nodeinfo.js';
|
||||
import wellKnown from './well-known.js';
|
||||
import apiServer from './api/index.js';
|
||||
import fileServer from './file/index.js';
|
||||
import proxyServer from './proxy/index.js';
|
||||
import webServer from './web/index.js';
|
||||
import { initializeStreamingServer } from './api/streaming.js';
|
||||
import { IsNull } from 'typeorm';
|
||||
|
||||
export const serverLogger = new Logger('server', 'gray', false);
|
||||
|
||||
@@ -81,7 +81,7 @@ router.get('/avatar/@:acct', async ctx => {
|
||||
});
|
||||
|
||||
if (user) {
|
||||
ctx.redirect(Users.getAvatarUrl(user));
|
||||
ctx.redirect(Users.getAvatarUrlSync(user));
|
||||
} else {
|
||||
ctx.redirect('/static-assets/user-unknown.png');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user