Skip to content

dynamic path intercepts static #168

@SalischevArtem

Description

@SalischevArtem

Hello!

I have the issue which was discussed but can't apply the suggested resolving.

I have two DELETE like bellow :

@delete('/agent/:id')
async deleteInactiveAgentFromProfiles(
@param('id') id: string,
): Promise {
return this.profilesService.deleteInactiveAgentFromProfilesById(id);
}

@delete(':id')
async deleteProfile(@param('id') id: string): Promise {
return this.profilesService.deleteProfileById(id);
}

My ids smt like this /^UPC-[0-9A-F]{19}-[0-9A-F]{1}$/

So regarding this issue in second DELETE I have to do smth like this
@Delete('/:id(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/')
But it doesn’t work.

What I'm doing wrong?

Thank for helping.

Metadata

Metadata

Assignees

No one assigned

    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