Skip to content

Conversation

@JanisSaldabols
Copy link
Collaborator

No description provided.

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, "", "")
Copy link
Contributor

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 {
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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 {
Copy link
Contributor

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) {
Copy link
Contributor

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 {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants