feat: Modify api key and sales channel link to use modules and add test (#6546)
This commit is contained in:
@@ -20,7 +20,7 @@ export const GET = async (
|
||||
const variables = { id: req.params.id }
|
||||
|
||||
const queryObject = remoteQueryObjectFromString({
|
||||
entryPoint: "api-key",
|
||||
entryPoint: "api_key",
|
||||
variables,
|
||||
fields: defaultAdminApiKeyFields,
|
||||
})
|
||||
@@ -66,7 +66,7 @@ export const DELETE = async (
|
||||
|
||||
res.status(200).json({
|
||||
id,
|
||||
object: "api-key",
|
||||
object: "api_key",
|
||||
deleted: true,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export const GET = async (
|
||||
const remoteQuery = req.scope.resolve("remoteQuery")
|
||||
|
||||
const queryObject = remoteQueryObjectFromString({
|
||||
entryPoint: "api-key",
|
||||
entryPoint: "api_key",
|
||||
variables: {
|
||||
filters: req.filterableFields,
|
||||
order: req.listConfig.order,
|
||||
@@ -47,7 +47,7 @@ export const POST = async (
|
||||
]
|
||||
|
||||
const { result, errors } = await createApiKeysWorkflow(req.scope).run({
|
||||
input: { apiKeysData: input },
|
||||
input: { api_keys: input },
|
||||
throwOnError: false,
|
||||
})
|
||||
|
||||
|
||||
@@ -34,6 +34,13 @@ export class AdminGetApiKeysParams extends extendedFindParamsMixin({
|
||||
@IsOptional()
|
||||
title?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter by token
|
||||
*/
|
||||
@IsString({ each: true })
|
||||
@IsOptional()
|
||||
token?: string | string[]
|
||||
|
||||
/**
|
||||
* Filter by type
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user