chore: Cleanup manager decorator usage (#9181)
This commit is contained in:
committed by
GitHub
parent
adbeb9cc1d
commit
81d3ae01c7
@@ -106,7 +106,7 @@ export class ApiKeyModuleService
|
||||
sharedContext?: Context
|
||||
): Promise<ApiKeyTypes.ApiKeyDTO>
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async createApiKeys(
|
||||
data: ApiKeyTypes.CreateApiKeyDTO | ApiKeyTypes.CreateApiKeyDTO[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
@@ -134,7 +134,7 @@ export class ApiKeyModuleService
|
||||
return Array.isArray(data) ? responseWithRawToken : responseWithRawToken[0]
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
protected async createApiKeys_(
|
||||
data: ApiKeyTypes.CreateApiKeyDTO[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
@@ -177,7 +177,7 @@ export class ApiKeyModuleService
|
||||
sharedContext?: Context
|
||||
): Promise<ApiKeyTypes.ApiKeyDTO>
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async upsertApiKeys(
|
||||
data: ApiKeyTypes.UpsertApiKeyDTO | ApiKeyTypes.UpsertApiKeyDTO[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
@@ -246,7 +246,7 @@ export class ApiKeyModuleService
|
||||
sharedContext?: Context
|
||||
): Promise<ApiKeyTypes.ApiKeyDTO[]>
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async updateApiKeys(
|
||||
idOrSelector: string | FilterableApiKeyProps,
|
||||
data: ApiKeyTypes.UpdateApiKeyDTO,
|
||||
@@ -272,7 +272,7 @@ export class ApiKeyModuleService
|
||||
return isString(idOrSelector) ? serializedResponse[0] : serializedResponse
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
protected async updateApiKeys_(
|
||||
normalizedInput: UpdateApiKeyInput[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
@@ -289,7 +289,7 @@ export class ApiKeyModuleService
|
||||
return updatedApiKeys
|
||||
}
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
// @ts-expect-error
|
||||
async retrieveApiKey(
|
||||
id: string,
|
||||
@@ -306,7 +306,7 @@ export class ApiKeyModuleService
|
||||
)
|
||||
}
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
//@ts-expect-error
|
||||
async listApiKeys(
|
||||
filters?: ApiKeyTypes.FilterableApiKeyProps,
|
||||
@@ -327,7 +327,7 @@ export class ApiKeyModuleService
|
||||
)
|
||||
}
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
//@ts-expect-error
|
||||
async listAndCountApiKeys(
|
||||
filters?: ApiKeyTypes.FilterableApiKeyProps,
|
||||
@@ -361,7 +361,7 @@ export class ApiKeyModuleService
|
||||
data: ApiKeyTypes.RevokeApiKeyDTO,
|
||||
sharedContext?: Context
|
||||
): Promise<ApiKeyTypes.ApiKeyDTO[]>
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async revoke(
|
||||
idOrSelector: string | FilterableApiKeyProps,
|
||||
data: ApiKeyTypes.RevokeApiKeyDTO,
|
||||
@@ -383,7 +383,7 @@ export class ApiKeyModuleService
|
||||
return isString(idOrSelector) ? serializedResponse[0] : serializedResponse
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
async revoke_(
|
||||
normalizedInput: RevokeApiKeyInput[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
@@ -411,7 +411,7 @@ export class ApiKeyModuleService
|
||||
return revokedApiKeys
|
||||
}
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async authenticate(
|
||||
token: string,
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
@@ -429,7 +429,7 @@ export class ApiKeyModuleService
|
||||
return serialized
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
protected async authenticate_(
|
||||
token: string,
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
|
||||
Reference in New Issue
Block a user