Skip to content

Module snippet is broken #2

Description

@jonathan-casarrubias

When you use the module snippet since it shadows the Module name

import { Module } from '@onixjs/core';

and

export class Module {}

It generates issues, the class should be renamed to something else like

export class MyModule {}

to avoid shadowing issues.

Also, the lifecycle requires to return the method result or will stop the flow.

    lifecycle: async(appp, metadata, method): Promise<any> => {
        // before call
        const result = await method();
        // before call
        return result;
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions