mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Fetch + create domain permissions from subscriptions nightly (#3635)
* peepeepoopoo * test domain perm subs * swagger * envparsing * dries your wets * start on docs * finish up docs * copy paste errors * rename actions package * rename force -> skipCache * move obfuscate parse nearer to where err is checked * make higherPrios a simple slice * don't use receiver for permsFrom funcs * add more context to error logs * defer finished log * use switch for permType instead of if/else * thanks linter, love you <3 * validate csv headers before full read * use bufio scanner
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
import { gtsApi } from "../../gts-api";
|
||||
|
||||
import type {
|
||||
DomainPerm,
|
||||
DomainPermSub,
|
||||
DomainPermSubCreateUpdateParams,
|
||||
DomainPermSubSearchParams,
|
||||
@ -120,6 +121,13 @@ const extended = gtsApi.injectEndpoints({
|
||||
asForm: true,
|
||||
body: { remove_children: remove_children },
|
||||
}),
|
||||
}),
|
||||
|
||||
testDomainPermissionSubscription: build.mutation<{ error: string } | DomainPerm[], string>({
|
||||
query: (id) => ({
|
||||
method: "POST",
|
||||
url: `/api/v1/admin/domain_permission_subscriptions/${id}/test`,
|
||||
}),
|
||||
})
|
||||
}),
|
||||
});
|
||||
@ -154,6 +162,11 @@ const useUpdateDomainPermissionSubscriptionMutation = extended.useUpdateDomainPe
|
||||
*/
|
||||
const useRemoveDomainPermissionSubscriptionMutation = extended.useRemoveDomainPermissionSubscriptionMutation;
|
||||
|
||||
/**
|
||||
* Test a domain permission subscription to see if data can be fetched + parsed.
|
||||
*/
|
||||
const useTestDomainPermissionSubscriptionMutation = extended.useTestDomainPermissionSubscriptionMutation;
|
||||
|
||||
export {
|
||||
useLazySearchDomainPermissionSubscriptionsQuery,
|
||||
useGetDomainPermissionSubscriptionQuery,
|
||||
@ -161,4 +174,5 @@ export {
|
||||
useGetDomainPermissionSubscriptionsPreviewQuery,
|
||||
useUpdateDomainPermissionSubscriptionMutation,
|
||||
useRemoveDomainPermissionSubscriptionMutation,
|
||||
useTestDomainPermissionSubscriptionMutation,
|
||||
};
|
||||
|
Reference in New Issue
Block a user