Commit 3132dc16 authored by nanahira's avatar nanahira

fix

parent 9cf290b6
Pipeline #19597 passed with stages
in 4 minutes and 34 seconds
...@@ -71,7 +71,6 @@ export class MycardAccountService extends CrudService(User) { ...@@ -71,7 +71,6 @@ export class MycardAccountService extends CrudService(User) {
@UseCommand('bind', '绑定 MyCard 帐号') @UseCommand('bind', '绑定 MyCard 帐号')
async bind(@PutUserId() id: string, needHint = false) { async bind(@PutUserId() id: string, needHint = false) {
const session = BindSession.create(id); const session = BindSession.create(id);
console.log(session.sessionId);
await this.aragami.set(session); await this.aragami.set(session);
const url = loginUrl( const url = loginUrl(
`${this.rootUrl}/api/mycard-account/bind?session=${session.sessionId}`, `${this.rootUrl}/api/mycard-account/bind?session=${session.sessionId}`,
...@@ -83,7 +82,6 @@ export class MycardAccountService extends CrudService(User) { ...@@ -83,7 +82,6 @@ export class MycardAccountService extends CrudService(User) {
dto: BindQueryDto, dto: BindQueryDto,
): Promise<{ error?: string; user?: MycardUser }> { ): Promise<{ error?: string; user?: MycardUser }> {
const session = await this.aragami.get(BindSession, dto.session); const session = await this.aragami.get(BindSession, dto.session);
console.log(dto.session, session);
if (!session) { if (!session) {
return { error: '会话不存在。' }; return { error: '会话不存在。' };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment