Skip to content

Enhance OnFunctionInvocationAsync Method in AnonymouseUserFilter Class #151

@brianrandell

Description

@brianrandell

Issue Description

The OnFunctionInvocationAsync method in the AnonymouseUserFilter class needs to be enhanced with better detection logic, specifically in the following code:

if (context.Arguments.TryGetValue("userName", out var userName) && userName!.ToString() == "guest")
{
    context.Result = new FunctionResult(context.Function, "No discounts for anonymous users allowed");
    return;
}

Expected Behavior

Improve the detection logic to handle edge cases and provide better validation.

Additional Information

This enhancement is necessary to ensure robustness in handling anonymous users.

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