chore: remove console.log

This commit is contained in:
chenos 2021-04-06 19:52:01 +08:00
parent efb0320427
commit b6cd540f72
6 changed files with 1 additions and 6 deletions

View File

@ -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)) {

View File

@ -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 ? {

View File

@ -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}`);
}
}

View File

@ -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

View File

@ -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({

View File

@ -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();
}