-
Notifications
You must be signed in to change notification settings - Fork 0
CROSSLINK-197 Patron Request API improvements #370
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
base: main
Are you sure you want to change the base?
Conversation
97d3364 to
233bf82
Compare
233bf82 to
49b290d
Compare
| index.Links.EventsLink = toLink(r, EVENTS_PATH, "", "") | ||
| index.Links.LocatedSuppliersLink = toLink(r, LOCATED_SUPPLIERS_PATH, "", "") | ||
| index.Links.PeersLink = toLink(r, PEERS_PATH, "", "") | ||
| index.Links.PatronRequestLink = toLink(r, PATRON_REQUEST_PATH, "", "") |
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.
@JanisSaldabols should be PatronRequestsLink
|
|
||
| if dbparams.Offset > 0 { | ||
| pOffset := dbparams.Offset - dbparams.Limit | ||
| func CollectAboutData(fullCount int64, offset int32, limit int32, r *http.Request) oapi.About { |
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.
@JanisSaldabols Can we move this to api/common.go?
| locatedSuppliersLink: | ||
| type: string | ||
| description: Link to located suppliers | ||
| patronRequestLink: |
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.
should be patronRequestsLink
| get: | ||
| summary: Retrieve patron requests | ||
| tags: | ||
| - PR |
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.
can we rename this tag to patron-request-api
| } | ||
|
|
||
| func NewApiHandler(prRepo pr_db.PrRepo, eventBus events.EventBus, tenant common.Tenant) PatronRequestApiHandler { | ||
| func NewApiHandler(prRepo pr_db.PrRepo, eventBus events.EventBus, tenant common.Tenant, limitDefault int32) PatronRequestApiHandler { |
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.
rename to NewPrApiHandler
| } | ||
| } | ||
|
|
||
| func (a *PatronRequestApiHandler) getSymbolForRequest(r *http.Request, tenant *string, symbol *string) (string, error) { |
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.
can this be moved to api/common.go and used across all APIs?
| writeJsonResponse(w, resp) | ||
| } | ||
|
|
||
| func addAccessRestrictions(cql *string, side string, symbol string) string { |
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.
we need to verify if this can be subject to CQL injection
No description provided.