fix: dingtalk server using tachbase/client (#1342)
Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: daoyoucloud/tachybase#1342
This commit is contained in:
parent
aedcf15863
commit
eaa9bb0bd2
@ -1,9 +1,9 @@
|
||||
import { BaseAuth } from '@tachybase/auth';
|
||||
|
||||
import { namespace } from '../constants';
|
||||
import { DingtalkClient } from './client';
|
||||
import { DingtalkClient } from './dingtalk-client';
|
||||
|
||||
export class Auth extends BaseAuth {
|
||||
export class DingtalkAuth extends BaseAuth {
|
||||
constructor(config) {
|
||||
const { ctx } = config;
|
||||
super({
|
@ -1,9 +1,8 @@
|
||||
import { tval } from '@tachybase/client';
|
||||
import { Gateway, Plugin } from '@tachybase/server';
|
||||
|
||||
import { authType, namespace } from '../constants';
|
||||
import { authType } from '../constants';
|
||||
import { getAuthUrl, redirect } from './actions/dingding';
|
||||
import { Auth } from './auth';
|
||||
import { DingtalkAuth } from './dingtalk-auth';
|
||||
|
||||
export class PluginDingdingServer extends Plugin {
|
||||
async afterAdd() {}
|
||||
@ -11,10 +10,8 @@ export class PluginDingdingServer extends Plugin {
|
||||
async beforeLoad() {}
|
||||
|
||||
async load() {
|
||||
console.log('hello world dingding');
|
||||
this.app.authManager.registerTypes(authType, {
|
||||
auth: Auth,
|
||||
title: tval('DingTalk', { ns: namespace }),
|
||||
auth: DingtalkAuth,
|
||||
});
|
||||
this.app.resourcer.define({
|
||||
name: 'dingtalk',
|
||||
|
Loading…
Reference in New Issue
Block a user