-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(router): add gateway_status_map
CRUD APIs
#2809
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
Conversation
.service(web::resource("/get").route(web::post().to(get_gsm_rule))) | ||
.service(web::resource("/update").route(web::post().to(update_gsm_rule))) | ||
.service(web::resource("/delete").route(web::post().to(delete_gsm_rule))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the endpoints and http methods do not match, ideally get should go with the GET http method, same for the rest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all CRUD APIs we need payload with connector, flow, sub_flow, code and message fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GET endpoint can use query parameters if the values are all single values (and not a list of values).
In order to make it easier to use the gsm apis, a gsm list endpoint will be a good addition. This endpoint can have filters for connector, flow_type etc. Also the update endpoint should not allow the primary key fields to be updated and instead allow only the actions ( step_up, retry_action etc ) to be updated. Each gsm can have a unique identifier This can be added as a good first issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, looks good to me!
.service(web::resource("/get").route(web::post().to(get_gsm_rule))) | ||
.service(web::resource("/update").route(web::post().to(update_gsm_rule))) | ||
.service(web::resource("/delete").route(web::post().to(delete_gsm_rule))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GET endpoint can use query parameters if the values are all single values (and not a list of values).
@sai-harsha-vardhan Can you add the cURL request? |
are the errors due to changes in this PR? |
@Narayanbhat166 This is due to APIEventMetrics which are added recently, fixing it! |
315bd1b
Type of Change
Description
add
gateway_status_map
CRUD APIsAdditional Changes
Motivation and Context
How did you test it?
Tested Manually
CURL
CURL
CURL
CURL
Checklist
cargo +nightly fmt --all
cargo clippy