mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
* Resolve #5117 * 出来立てのユーザーがストリームコネクションを持ってるはずがない
This commit is contained in:
parent
040e8b9ff0
commit
0ad558d40c
1 changed files with 11 additions and 1 deletions
|
@ -5,7 +5,7 @@ import generateUserToken from '../common/generate-native-user-token';
|
|||
import config from '../../../config';
|
||||
import { fetchMeta } from '../../../misc/fetch-meta';
|
||||
import * as recaptcha from 'recaptcha-promise';
|
||||
import { Users, RegistrationTickets } from '../../../models';
|
||||
import { Users, Signins, RegistrationTickets } from '../../../models';
|
||||
import { genId } from '../../../misc/gen-id';
|
||||
import { usersChart } from '../../../services/chart';
|
||||
import { User } from '../../../models/entities/user';
|
||||
|
@ -137,6 +137,16 @@ export default async (ctx: Koa.BaseContext) => {
|
|||
|
||||
usersChart.update(account, true);
|
||||
|
||||
// Append signin history
|
||||
await Signins.save({
|
||||
id: genId(),
|
||||
createdAt: new Date(),
|
||||
userId: account.id,
|
||||
ip: ctx.ip,
|
||||
headers: ctx.headers,
|
||||
success: true
|
||||
});
|
||||
|
||||
const res = await Users.pack(account, account, {
|
||||
detail: true,
|
||||
includeSecrets: true
|
||||
|
|
Loading…
Reference in a new issue