Skip to content

Conversation

@breadchris
Copy link
Contributor

Resolves #164

Destination Destination `gorm:"constraint:OnDelete:CASCADE"`
HashedAPIKey string `gorm:"index"`
// If the API key is specific to a saved query
SavedQueryID uint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment here (I realize this is copied from my existing branch.) I'd started to refactor this so that the APIKey table does not have a SavedQuery, and instead use a Join table, ie, apikey_savedquery. Then I just added an APIKey "type" (QUERY, GENERAL - or something more descriptive) that tells me about who the key belongs to.

This also then lets me create a single API key and give it access to multiple endpoints. And it didn't make sense the QueryParams be in this table either since it's such a specific use case.

@breadchris breadchris marked this pull request as ready for review April 19, 2024 17:30
@breadchris breadchris mentioned this pull request Apr 20, 2024
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.

Queries as an API

2 participants