refactor: rewrite create-app-auth-client mutation as REST endpoint

This commit is contained in:
Ali BARIN
2024-08-23 13:51:31 +00:00
parent 164d31dfbc
commit 81c39d7d93
14 changed files with 168 additions and 63 deletions

View File

@@ -1,9 +1,9 @@
import { useQuery } from '@tanstack/react-query';
import api from 'helpers/api';
export default function useAdminAppAuthClient(appKey) {
export default function useAdminAppAuthClients(appKey) {
const query = useQuery({
queryKey: ['admin', 'apps', appKey, 'auth-clients'],
queryKey: ['admin', 'apps', appKey, 'authClients'],
queryFn: async ({ signal }) => {
const { data } = await api.get(`/v1/admin/apps/${appKey}/auth-clients`, {
signal,