fix: make return-reason.js pass eslint (#539)
This commit is contained in:
1 parent
f2d97dfb86
commit
b6efa6f471
2 files changed
+7
-7
No files matched your search
@@ -16,7 +16,6 @@
|
|||||||
/packages/medusa/src/services/product-variant.js
|
/packages/medusa/src/services/product-variant.js
|
||||||
/packages/medusa/src/services/product.js
|
/packages/medusa/src/services/product.js
|
||||||
/packages/medusa/src/services/query-builder.js
|
/packages/medusa/src/services/query-builder.js
|
||||||
/packages/medusa/src/services/return-reason.js
|
|
||||||
/packages/medusa/src/services/return.js
|
/packages/medusa/src/services/return.js
|
||||||
/packages/medusa/src/services/shipping-profile.js
|
/packages/medusa/src/services/shipping-profile.js
|
||||||
/packages/medusa/src/services/store.js
|
/packages/medusa/src/services/store.js
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Validator, MedusaError } from "medusa-core-utils"
|
import { MedusaError } from "medusa-core-utils"
|
||||||
import { BaseService } from "medusa-interfaces"
|
import { BaseService } from "medusa-interfaces"
|
||||||
import { In } from "typeorm"
|
|
||||||
|
|
||||||
class ReturnReasonService extends BaseService {
|
class ReturnReasonService extends BaseService {
|
||||||
constructor({ manager, returnReasonRepository }) {
|
constructor({ manager, returnReasonRepository }) {
|
||||||
@@ -29,7 +28,7 @@ class ReturnReasonService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create(data) {
|
create(data) {
|
||||||
return this.atomicPhase_(async manager => {
|
return this.atomicPhase_(async (manager) => {
|
||||||
const rrRepo = manager.getCustomRepository(this.retReasonRepo_)
|
const rrRepo = manager.getCustomRepository(this.retReasonRepo_)
|
||||||
|
|
||||||
if (data.parent_return_reason_id && data.parent_return_reason_id !== "") {
|
if (data.parent_return_reason_id && data.parent_return_reason_id !== "") {
|
||||||
@@ -51,7 +50,7 @@ class ReturnReasonService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update(id, data) {
|
update(id, data) {
|
||||||
return this.atomicPhase_(async manager => {
|
return this.atomicPhase_(async (manager) => {
|
||||||
const rrRepo = manager.getCustomRepository(this.retReasonRepo_)
|
const rrRepo = manager.getCustomRepository(this.retReasonRepo_)
|
||||||
const reason = await this.retrieve(id)
|
const reason = await this.retrieve(id)
|
||||||
|
|
||||||
@@ -77,6 +76,7 @@ class ReturnReasonService extends BaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} selector - the query object for find
|
* @param {Object} selector - the query object for find
|
||||||
|
* @param {Object} config - config object
|
||||||
* @return {Promise} the result of the find operation
|
* @return {Promise} the result of the find operation
|
||||||
*/
|
*/
|
||||||
async list(
|
async list(
|
||||||
@@ -90,7 +90,8 @@ class ReturnReasonService extends BaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an order by id.
|
* Gets an order by id.
|
||||||
* @param {string} orderId - id of order to retrieve
|
* @param {string} id - id of order to retrieve
|
||||||
|
* @param {Object} config - config object
|
||||||
* @return {Promise<Order>} the order document
|
* @return {Promise<Order>} the order document
|
||||||
*/
|
*/
|
||||||
async retrieve(id, config = {}) {
|
async retrieve(id, config = {}) {
|
||||||
@@ -111,7 +112,7 @@ class ReturnReasonService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async delete(returnReasonId) {
|
async delete(returnReasonId) {
|
||||||
return this.atomicPhase_(async manager => {
|
return this.atomicPhase_(async (manager) => {
|
||||||
const rrRepo = manager.getCustomRepository(this.retReasonRepo_)
|
const rrRepo = manager.getCustomRepository(this.retReasonRepo_)
|
||||||
|
|
||||||
// We include the relation 'return_reason_children' to enable cascading deletes of return reasons if a parent is removed
|
// We include the relation 'return_reason_children' to enable cascading deletes of return reasons if a parent is removed
|
||||||
|
|||||||
Reference in new issue
Block a user