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

Can ObjectId be used as GET-Parameter directly? #8158

Open
fm3 opened this issue Oct 30, 2024 · 2 comments · May be fixed by #8285
Open

Can ObjectId be used as GET-Parameter directly? #8158

fm3 opened this issue Oct 30, 2024 · 2 comments · May be fixed by #8285

Comments

@fm3
Copy link
Member

fm3 commented Oct 30, 2024

Many routes implementations in our backend start with ObjectId.fromString(aPassedIdString).
Maybe an implicit conversion can be done by play to directly support ObjectId as a GET parameter type?

If the returned error looks different then, we should check how the frontend displays it.

Should probably be tackled after #8075 to minimize merge conflicts

Since ObjectId is moved to util or datastore there anyway, we should also use it everywhere in datastore/tracingstore where objectIds are handled (currently they are only passed around as strings there in some places)

@MichaelBuessemeyer
Copy link
Contributor

@frcroth
Copy link
Member

frcroth commented Nov 18, 2024

Yes, it definitely works and does not seem to be hard. I tested it for one route here: https://github.com/scalableminds/webknossos/compare/objectid-as-get-parameter-spike?expand=1

So after #8075 is merged, I should be able to implement it.

Resources:

@frcroth frcroth linked a pull request Dec 16, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants