chore: Cleanup manager decorator usage (#9181)
This commit is contained in:
1 parent
adbeb9cc1d
commit
81d3ae01c7
20 files changed
+362
-359
No files matched your search
@@ -4,8 +4,8 @@ import {
|
||||
DAL,
|
||||
FilterableStockLocationProps,
|
||||
IEventBusService,
|
||||
IStockLocationService,
|
||||
InternalModuleDeclaration,
|
||||
IStockLocationService,
|
||||
ModuleJoinerConfig,
|
||||
ModulesSdkTypes,
|
||||
StockLocationAddressInput,
|
||||
@@ -16,10 +16,10 @@ import {
|
||||
import {
|
||||
InjectManager,
|
||||
InjectTransactionManager,
|
||||
isString,
|
||||
MedusaContext,
|
||||
MedusaService,
|
||||
Modules,
|
||||
isString,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { joinerConfig } from "../joiner-config"
|
||||
@@ -79,7 +79,7 @@ export default class StockLocationModuleService
|
||||
context: Context
|
||||
): Promise<StockLocationTypes.StockLocationDTO[]>
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async createStockLocations(
|
||||
data: CreateStockLocationInput | CreateStockLocationInput[],
|
||||
@MedusaContext() context: Context = {}
|
||||
@@ -98,7 +98,7 @@ export default class StockLocationModuleService
|
||||
return Array.isArray(data) ? serialized : serialized[0]
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
async createStockLocations_(
|
||||
data: CreateStockLocationInput[],
|
||||
@MedusaContext() context: Context = {}
|
||||
@@ -115,7 +115,7 @@ export default class StockLocationModuleService
|
||||
context?: Context
|
||||
): Promise<StockLocationTypes.StockLocationDTO[]>
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async upsertStockLocations(
|
||||
data: UpsertStockLocationInput | UpsertStockLocationInput[],
|
||||
@MedusaContext() context: Context = {}
|
||||
@@ -132,7 +132,7 @@ export default class StockLocationModuleService
|
||||
>(Array.isArray(data) ? result : result[0])
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
async upsertStockLocations_(
|
||||
input: UpsertStockLocationInput[],
|
||||
@MedusaContext() context: Context = {}
|
||||
@@ -174,7 +174,7 @@ export default class StockLocationModuleService
|
||||
* @param context
|
||||
* @returns The updated stock location.
|
||||
*/
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async updateStockLocations(
|
||||
idOrSelector: string | FilterableStockLocationProps,
|
||||
data: UpdateStockLocationInput | UpdateStockLocationInput[],
|
||||
@@ -200,7 +200,7 @@ export default class StockLocationModuleService
|
||||
return Array.isArray(data) ? serialized : serialized[0]
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
async updateStockLocations_(
|
||||
data:
|
||||
| UpdateStockLocationInput[]
|
||||
@@ -221,7 +221,7 @@ export default class StockLocationModuleService
|
||||
context?: Context
|
||||
): Promise<StockLocationTypes.StockLocationAddressDTO[]>
|
||||
|
||||
@InjectManager("baseRepository_")
|
||||
@InjectManager()
|
||||
async updateStockLocationAddresses(
|
||||
data:
|
||||
| (StockLocationAddressInput & { id: string })
|
||||
@@ -240,7 +240,7 @@ export default class StockLocationModuleService
|
||||
return Array.isArray(data) ? serialized : serialized[0]
|
||||
}
|
||||
|
||||
@InjectTransactionManager("baseRepository_")
|
||||
@InjectTransactionManager()
|
||||
private async updateStockLocationAddresses_(
|
||||
input: (StockLocationAddressInput & { id: string })[],
|
||||
@MedusaContext() context: Context
|
||||
|
||||
Reference in new issue
Block a user