summaryrefslogtreecommitdiff
path: root/src/server/api/private
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/private')
-rw-r--r--src/server/api/private/signin.ts5
-rw-r--r--src/server/api/private/signup.ts14
2 files changed, 12 insertions, 7 deletions
diff --git a/src/server/api/private/signin.ts b/src/server/api/private/signin.ts
index 0e44c2ddd6..0a0f9ae6f9 100644
--- a/src/server/api/private/signin.ts
+++ b/src/server/api/private/signin.ts
@@ -12,9 +12,8 @@ export default async (ctx: Koa.Context) => {
ctx.set('Access-Control-Allow-Credentials', 'true');
const body = ctx.request.body as any;
- // See: https://github.com/syuilo/misskey/issues/2384
- const username = body['username'] || body['x'];
- const password = body['password'] || body['y'];
+ const username = body['username'];
+ const password = body['password'];
const token = body['token'];
if (typeof username != 'string') {
diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts
index e3e8f044b5..d6eba69817 100644
--- a/src/server/api/private/signup.ts
+++ b/src/server/api/private/signup.ts
@@ -7,7 +7,7 @@ import generateUserToken from '../common/generate-native-user-token';
import config from '../../../config';
import Meta from '../../../models/meta';
import RegistrationTicket from '../../../models/registration-tickets';
-import { updateUserStats } from '../../../services/update-chart';
+import usersChart from '../../../chart/users';
if (config.recaptcha) {
recaptcha.init({
@@ -130,8 +130,14 @@ export default async (ctx: Koa.Context) => {
}, { upsert: true });
//#endregion
- updateUserStats(account, true);
+ usersChart.update(account, true);
- // Response
- ctx.body = await pack(account);
+ const res = await pack(account, account, {
+ detail: true,
+ includeSecrets: true
+ });
+
+ res.token = secret;
+
+ ctx.body = res;
};