diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-12 01:52:25 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-12 01:52:25 +0900 |
| commit | 2ff3069d23aa688cea5a3bd204236f2f2f64c201 (patch) | |
| tree | 479448f49c2204e5729ed28a1af34a86e354492b /src/server/web/index.ts | |
| parent | トランザクションを使用してアンケートレコードの挿入... (diff) | |
| download | sharkey-2ff3069d23aa688cea5a3bd204236f2f2f64c201.tar.gz sharkey-2ff3069d23aa688cea5a3bd204236f2f2f64c201.tar.bz2 sharkey-2ff3069d23aa688cea5a3bd204236f2f2f64c201.zip | |
トランザクションを使うようにしたり
Diffstat (limited to 'src/server/web/index.ts')
| -rw-r--r-- | src/server/web/index.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/web/index.ts b/src/server/web/index.ts index de0d65cf33..d1a15e3929 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -16,7 +16,7 @@ import fetchMeta from '../../misc/fetch-meta'; import * as pkg from '../../../package.json'; import { genOpenapiSpec } from '../api/openapi/gen-spec'; import config from '../../config'; -import { Users, Notes, Emojis } from '../../models'; +import { Users, Notes, Emojis, UserProfiles } from '../../models'; import parseAcct from '../../misc/acct/parse'; import getNoteSummary from '../../misc/get-note-summary'; @@ -149,11 +149,14 @@ router.get('/@:user', async (ctx, next) => { usernameLower: username.toLowerCase(), host }); + const profile = await UserProfiles.findOne({ + userId: user.id + }); if (user != null) { const meta = await fetchMeta(); await ctx.render('user', { - user, + user, profile, instanceName: meta.name || 'Misskey' }); ctx.set('Cache-Control', 'public, max-age=180'); |