-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
[feature] Create/update/remove domain permission subscriptions #3623
Conversation
|
||
// Ensure URI is set. | ||
if form.URI == nil { | ||
const errText = "uri must be set" |
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.
same as below
// Allocate return slice (will be at most len permSubIDs). | ||
permSubs := make([]*gtsmodel.DomainPermissionSubscription, 0, len(permSubIDs)) | ||
for _, id := range permSubIDs { | ||
permSub, err := d.GetDomainPermissionSubscriptionByID(ctx, id) |
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.
given that domain subscriptions encourage people to use the domain permission system more (so this endpoint will be called more often), do you think this is worth writing an optimized GetDomainPermissionSubscriptionsByIDs() function?
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.
It might be yeah... if it's alright with you I'd rather do this as a separate chore PR though.
// Allocate return slice (will be at most len permSubIDs). | ||
permSubs := make([]*gtsmodel.DomainPermissionSubscription, 0, len(permSubIDs)) | ||
for _, id := range permSubIDs { | ||
permSub, err := d.GetDomainPermissionSubscriptionByID(ctx, id) |
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.
same as above
Description
This PR adds database functions and frontend + api bits for creating, viewing, updating, and removing domain permission subscriptions. Currently the domain permission subscriptions aren't actually activated, this is to come in the next PR.
Documentation + tests and all that jazz to follow, also in a separate PR, to keep things manageable.
Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.