mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:55:33 +00:00
chore: remove console.log
This commit is contained in:
parent
efb0320427
commit
b6cd540f72
@ -288,7 +288,6 @@ export async function get(ctx: Context, next: Next) {
|
||||
resourceKeyAttribute,
|
||||
fields = []
|
||||
} = ctx.action.params;
|
||||
console.log({ associated, resourceField })
|
||||
if (associated && resourceField) {
|
||||
const AssociatedModel = ctx.db.getModel(associatedName);
|
||||
if (!(associated instanceof AssociatedModel)) {
|
||||
|
@ -19,7 +19,6 @@ export default async (ctx, next) => {
|
||||
}
|
||||
});
|
||||
const menuIds = menu_permissions.map(item => item.menu_id);
|
||||
console.log({ resourceKey, roles, menuIds });
|
||||
const Menu = ctx.db.getModel('menus') as ModelCtor<Model>;
|
||||
const menu = await Menu.findOne({
|
||||
where: isRoot ? {
|
||||
|
@ -397,7 +397,6 @@ export default async (ctx, next) => {
|
||||
if (!['subTable', 'linkTo', 'attachment', 'updatedBy', 'createdBy'].includes(child.get('interface'))) {
|
||||
continue;
|
||||
}
|
||||
console.log(child.name);
|
||||
appends.push(`${field.name}.${child.name}`);
|
||||
}
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ export async function update(ctx: actions.Context, next: actions.Next) {
|
||||
return next();
|
||||
}
|
||||
|
||||
console.log(ctx.action.params, { routable_type: tableName, routable_id: resourceKey });
|
||||
// console.log(ctx.action.params, { routable_type: tableName, routable_id: resourceKey });
|
||||
let [route] = await associated.getRoutes({
|
||||
where: { routable_type: tableName, routable_id: resourceKey },
|
||||
limit: 1
|
||||
|
@ -51,7 +51,6 @@ export default async function (options = {}) {
|
||||
resourcer.use(async (ctx, next) => {
|
||||
const { actionName, resourceName, values } = ctx.action.params;
|
||||
if (resourceName === 'menus' && ['create', 'update'].includes(actionName)) {
|
||||
console.log({values});
|
||||
if (values.parent) {
|
||||
delete values.parent.children;
|
||||
ctx.action.mergeParams({
|
||||
|
@ -125,7 +125,6 @@ export class Permissions {
|
||||
});
|
||||
if (fps.length) {
|
||||
for (const fp of fps) {
|
||||
console.log('fp.actions', fp.actions);
|
||||
if (Array.isArray(fp.actions) && fp.actions.includes(`${resourceField.options.collection_name}:${actionName}`)) {
|
||||
return next();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user