feat: API key sales channel link (#6851)
What - Add link between API key and sales channels - Add API route for batch adding sales channels to a publishable API key - Clean up API key API routes responses - Move API key test suite from `integration-tests/modules` to `integration-tests/api`
This commit is contained in:
@@ -3,7 +3,9 @@ import { ModuleJoinerConfig } from "@medusajs/types"
|
||||
import { MapToConfig } from "@medusajs/utils"
|
||||
import ApiKey from "./models/api-key"
|
||||
|
||||
export const LinkableKeys: Record<string, string> = {}
|
||||
export const LinkableKeys: Record<string, string> = {
|
||||
api_key_id: ApiKey.name,
|
||||
}
|
||||
|
||||
const entityLinkableKeysMap: MapToConfig = {}
|
||||
Object.entries(LinkableKeys).forEach(([key, value]) => {
|
||||
|
||||
@@ -6,10 +6,10 @@ import {
|
||||
import {
|
||||
BeforeCreate,
|
||||
Entity,
|
||||
Enum,
|
||||
OnInit,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Enum,
|
||||
} from "@mikro-orm/core"
|
||||
|
||||
const TypeIndex = createPsqlIndexStatementHelper({
|
||||
|
||||
Reference in New Issue
Block a user