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

fix(wizard-api): return null with 200 instead of 404 for unconfigured items #361

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

Stell0
Copy link
Collaborator

@Stell0 Stell0 commented Jan 16, 2025

Updated the following endpoints to return null and HTTP status 200 when no configured items are found:

  • GET /mobiles/{mainextension}
  • GET /mobileapp/{mainextension}
  • GET /nethlink/{mainextension}
  • GET /webrtc/{mainextension}
  • GET /voicemails/{extension}

NethServer/dev#7259

… items

Updated the following endpoints to return null and HTTP status 200 when no configured items are found:
- GET /mobiles/{mainextension}
- GET /mobileapp/{mainextension}
- GET /nethlink/{mainextension}
- GET /webrtc/{mainextension}
- GET /voicemails/{extension}
@Stell0 Stell0 requested a review from Amygos January 16, 2025 11:24
@Amygos
Copy link
Member

Amygos commented Jan 16, 2025

I am not convinced about this approach, semantically a 404 is the correct return code in these cases. How will the frontend handle the change in return codes? I'd like to try to minimize the API calls in case of a 404 and/or fine-tune CrowdSec.

@Stell0
Copy link
Collaborator Author

Stell0 commented Jan 29, 2025

We already discussed it here and here

@Stell0 Stell0 requested a review from tonyco97 January 30, 2025 08:44
@Stell0 Stell0 merged commit a1a64d0 into main Jan 30, 2025
5 checks passed
@Stell0 Stell0 deleted the 7259_backend branch January 30, 2025 09:24
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

Successfully merging this pull request may close these issues.

3 participants