feat: Add endpoint to post new allowlist#5579
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new POST endpoint to create remodel allowlists for stores. The endpoint accepts JSON payloads containing allowlist data (description, from-model, from-serial, to-model) and creates them via the publisher gateway.
Changes:
- New POST endpoint
/api/store/<store_id>/models/remodel-allowlistfor creating remodel allowlists - Endpoint includes authentication (
@login_required,@exchange_required) and error handling for API and generic exceptions - Test suite with three test cases covering success, store not found, and empty payload scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| webapp/endpoints/models.py | Adds create_remodel_allowlist function with POST route, implementing the endpoint logic with exception handling |
| tests/endpoints/tests_models.py | Adds TestCreateRemodelAllowlist test class with three test methods to verify endpoint behavior |
aeeea16 to
2c1b053
Compare
2c1b053 to
37fe89f
Compare
bartaz
reviewed
Feb 6, 2026
bartaz
reviewed
Feb 6, 2026
564072a to
9d1fc23
Compare
edisile
reviewed
Feb 11, 2026
9c1e057 to
eadf84e
Compare
Contributor
Author
edisile
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done
Adds an endpoint to create a new remodel allowlist
How to QA
Run locally and use Postman to test the responses
URL
http://localhost:8004/api/store/njwQYXFnS7ppo7LaGxoh7aqVZc1CPi26/models/remodel-allowlist
Headers
Body
[{"from-model":"testmodelzzzz","to-model":"my-name-is-luke","from-serial":"GN4R66MulBPDMooy8Ch_VNzkJBW56zFwEupqSodfKhFbfVz_5hSUgSWztUwbvNPB-Hlkj"}]Requests
[]- you should get an errorTesting
Security
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-33419
Screenshots
n/a
UX Approval