Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can remove a get / ? #13

Open
KendaFR opened this issue Oct 14, 2024 · 4 comments
Open

How can remove a get / ? #13

KendaFR opened this issue Oct 14, 2024 · 4 comments

Comments

@KendaFR
Copy link

KendaFR commented Oct 14, 2024

Hi,

I would make a simply application for minecraft with web request. I would if player disconnect, a route with name delete, but Spark.routes().removeif(...) not work.

@nmondal
Copy link
Owner

nmondal commented Dec 4, 2024

Let me see. If it is even possible or if it should have been possible.

@RomainDR
Copy link

RomainDR commented Dec 4, 2024

I have found !
We have a parameter to set language translate (English -> any; Any -> Any)

@nmondal
Copy link
Owner

nmondal commented Dec 5, 2024

@RomainDR is this bug still relevant?

@nmondal
Copy link
Owner

nmondal commented Dec 9, 2024

@KendaFR @RomainDR

    /**
     * Unmaps a particular route from the collection of those that have been previously routed.
     * Search for previously established routes using the given path and unmaps any matches that are found.
     *
     * @param path the route path
     * @return <tt>true</tt> if this is a matching route which has been previously routed
     * @throws IllegalArgumentException if <tt>path</tt> is null or blank
     */
    public boolean unmap(String path) {
        return routes.remove(path);
    }

Does this work for you guys?
Usage should be :

Spark.unmap("/some-earlier-path");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants