feat: Bring back API key sales channel management (#6976)

- Add API key sales channel management
- Add HTTP responses for API keys and sales channels
- Use HTTP responses in `dashboard` and remove now redundant types
This commit is contained in:
Oli Juhl
2024-04-06 16:30:27 +00:00
committed by GitHub
parent 58c68f6715
commit 5724d80286
22 changed files with 533 additions and 607 deletions
@@ -7,7 +7,7 @@ import { ErrorBoundary } from "../../components/error/error-boundary"
import { MainLayout } from "../../components/layout-v2/main-layout"
import { SettingsLayout } from "../../components/layout/settings-layout"
import { useMe } from "../../hooks/api/users"
import { ApiKeyRes } from "../../types/api-responses"
import { AdminApiKeyResponse } from "@medusajs/types"
import { SearchProvider } from "../search-provider"
import { SidebarProvider } from "../sidebar-provider"
@@ -489,8 +489,7 @@ export const v2Routes: RouteObject[] = [
"../../v2-routes/api-key-management/api-key-management-detail"
),
handle: {
crumb: (data: ApiKeyRes) => {
console.log("data", data)
crumb: (data: AdminApiKeyResponse) => {
return data.api_key.title
},
},