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 { BaseAuth } from '@tachybase/auth';
|
||||||
|
|
||||||
import { namespace } from '../constants';
|
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) {
|
constructor(config) {
|
||||||
const { ctx } = config;
|
const { ctx } = config;
|
||||||
super({
|
super({
|
@ -1,9 +1,8 @@
|
|||||||
import { tval } from '@tachybase/client';
|
|
||||||
import { Gateway, Plugin } from '@tachybase/server';
|
import { Gateway, Plugin } from '@tachybase/server';
|
||||||
|
|
||||||
import { authType, namespace } from '../constants';
|
import { authType } from '../constants';
|
||||||
import { getAuthUrl, redirect } from './actions/dingding';
|
import { getAuthUrl, redirect } from './actions/dingding';
|
||||||
import { Auth } from './auth';
|
import { DingtalkAuth } from './dingtalk-auth';
|
||||||
|
|
||||||
export class PluginDingdingServer extends Plugin {
|
export class PluginDingdingServer extends Plugin {
|
||||||
async afterAdd() {}
|
async afterAdd() {}
|
||||||
@ -11,10 +10,8 @@ export class PluginDingdingServer extends Plugin {
|
|||||||
async beforeLoad() {}
|
async beforeLoad() {}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
console.log('hello world dingding');
|
|
||||||
this.app.authManager.registerTypes(authType, {
|
this.app.authManager.registerTypes(authType, {
|
||||||
auth: Auth,
|
auth: DingtalkAuth,
|
||||||
title: tval('DingTalk', { ns: namespace }),
|
|
||||||
});
|
});
|
||||||
this.app.resourcer.define({
|
this.app.resourcer.define({
|
||||||
name: 'dingtalk',
|
name: 'dingtalk',
|
||||||
|
Loading…
Reference in New Issue
Block a user