fix: collections path

This commit is contained in:
chenos 2023-01-08 20:47:00 +08:00
parent 6b0ed79f51
commit 668f96fb25
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ export class OidcPlugin extends Plugin {
async load() { async load() {
// 导入 collection // 导入 collection
await this.importCollections(resolve(__dirname, '../collections')); await this.importCollections(resolve(__dirname, './collections'));
// 获取 User 插件 // 获取 User 插件
const userPlugin = this.app.getPlugin<any>('users'); const userPlugin = this.app.getPlugin<any>('users');

View File

@ -13,7 +13,7 @@ export class SAMLPlugin extends Plugin {
async load() { async load() {
// 导入 collection // 导入 collection
await this.importCollections(resolve(__dirname, '../collections')); await this.importCollections(resolve(__dirname, './collections'));
// 获取 User 插件 // 获取 User 插件
const userPlugin = this.app.getPlugin<any>('users'); const userPlugin = this.app.getPlugin<any>('users');

View File

@ -1,9 +1,9 @@
import { randomInt } from 'crypto';
import path from 'path'; import path from 'path';
import { promisify } from 'util'; import { promisify } from 'util';
import { randomInt } from 'crypto';
import { Registry } from '@nocobase/utils';
import { Plugin } from '@nocobase/server'; import { Plugin } from '@nocobase/server';
import { Registry } from '@nocobase/utils';
import { Pattern, SequenceField } from './fields/sequence-field'; import { Pattern, SequenceField } from './fields/sequence-field';
const asyncRandomInt = promisify(randomInt); const asyncRandomInt = promisify(randomInt);