mirror of
https://github.com/certd/certd.git
synced 2026-04-15 21:40:53 +08:00
fix: 修复域名管理无法创建tencent-eo dns授权的bug
https://github.com/certd/certd/issues/587
This commit is contained in:
@@ -184,7 +184,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
name: "AccessSelector",
|
||||
vModel: "modelValue",
|
||||
type: compute(({ form }) => {
|
||||
return form.dnsProviderType;
|
||||
const type = form.dnsProviderType || "aliyun";
|
||||
return dnsProviderTypeDict?.dataMap[type]?.accessType;
|
||||
}),
|
||||
},
|
||||
show: compute(({ form }) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { LoginService } from "../../../modules/login/service/login-service.js";
|
||||
*/
|
||||
@Provide()
|
||||
@Controller('/api')
|
||||
export class LoginController extends BaseController {
|
||||
export class ForgotPasswordController extends BaseController {
|
||||
@Inject()
|
||||
loginService: LoginService;
|
||||
@Inject()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { AddonService, BaseController, Constants, newAddon, SysInstallInfo, SysOauthSetting, SysSettingsService } from "@certd/lib-server";
|
||||
import { ALL, Body, Controller, Get, Inject, Post, Provide, Query } from "@midwayjs/core";
|
||||
import { IOauthProvider } from "../../../plugins/plugin-oauth/api.js";
|
||||
import { BaseController, Constants, SysInstallInfo, SysOauthSetting, SysSettingsService } from "@certd/lib-server";
|
||||
import { ALL, Body, Controller, Inject, Post, Provide } from "@midwayjs/core";
|
||||
import { AddonGetterService } from "../../../modules/pipeline/service/addon-getter-service.js";
|
||||
import { IOauthProvider } from "../../../plugins/plugin-oauth/api.js";
|
||||
|
||||
/**
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ export class ConnectController extends BaseController {
|
||||
}
|
||||
|
||||
@Post('/login', { summary: Constants.per.guest })
|
||||
public async login(@Query(ALL) body: {type:string}) {
|
||||
public async login(@Body(ALL) body: {type:string}) {
|
||||
|
||||
const addon = await this.getOauthProvider(body.type);
|
||||
const installInfo = await this.sysSettingsService.getSetting<SysInstallInfo>(SysInstallInfo);
|
||||
@@ -40,7 +40,7 @@ export class ConnectController extends BaseController {
|
||||
return this.ok(loginUrl);
|
||||
}
|
||||
@Post('/callback', { summary: Constants.per.guest })
|
||||
public async callback(@Query(ALL) body: any) {
|
||||
public async callback(@Body(ALL) body: any) {
|
||||
//处理登录回调
|
||||
const addon = await this.getOauthProvider(body.type);
|
||||
const tokenRes = await addon.onCallback({
|
||||
@@ -51,16 +51,15 @@ export class ConnectController extends BaseController {
|
||||
|
||||
const userInfo = tokenRes.userInfo;
|
||||
|
||||
|
||||
const openId = userInfo.openId;
|
||||
|
||||
|
||||
return this.ok(tokenRes);
|
||||
return this.ok(openId);
|
||||
}
|
||||
|
||||
@Post('/bind', { summary: Constants.per.guest })
|
||||
public async bind(@Body(ALL) body: any) {
|
||||
const autoRegister = body.autoRegister || false;
|
||||
const bindInfo = body.bind || {};
|
||||
// const autoRegister = body.autoRegister || false;
|
||||
// const bindInfo = body.bind || {};
|
||||
//处理登录回调
|
||||
return this.ok(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user