chore: cleanup inspection (#6358)

This commit is contained in:
Adrien de Peretti
2024-02-09 14:40:09 +01:00
committed by GitHub
parent 94062d28be
commit b91a1ca5b8
19 changed files with 66 additions and 72 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import {
} from "@medusajs/modules-sdk"
import { ICustomerModuleService, ModulesSdkTypes } from "@medusajs/types"
import { moduleDefinition } from "../module-definition"
import { InitializeModuleInjectableDependencies } from "../types"
import { InitializeModuleInjectableDependencies } from "@types"
export const initialize = async (
options?:
+1 -3
View File
@@ -6,11 +6,9 @@ import {
Collection,
Entity,
Filter,
Index,
ManyToMany,
ManyToOne,
OnInit,
OneToMany,
OnInit,
OptionalProps,
PrimaryKey,
Property,
@@ -176,7 +176,7 @@ export default class CustomerModuleService<
| {
selector: CustomerTypes.FilterableCustomerProps
data: CustomerTypes.CustomerUpdatableFields
} = []
}
if (isString(idsOrSelector)) {
updateData = {
@@ -269,7 +269,7 @@ export default class CustomerModuleService<
| {
selector: CustomerTypes.FilterableCustomerGroupProps
data: CustomerTypes.CustomerGroupUpdatableFields
} = []
}
if (isString(groupIdOrSelector) || Array.isArray(groupIdOrSelector)) {
const groupIdOrSelectorArray = Array.isArray(groupIdOrSelector)
@@ -373,12 +373,10 @@ export default class CustomerModuleService<
| CustomerTypes.CreateCustomerAddressDTO[],
@MedusaContext() sharedContext: Context = {}
) {
const addresses = await this.addressService_.create(
return await this.addressService_.create(
Array.isArray(data) ? data : [data],
sharedContext
)
return addresses
}
async updateAddresses(
@@ -411,7 +409,7 @@ export default class CustomerModuleService<
| {
selector: CustomerTypes.FilterableCustomerAddressProps
data: CustomerTypes.UpdateCustomerAddressDTO
} = []
}
if (isString(addressIdOrSelector)) {
updateData = [
{