fix: merge
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
testEnvironment: "node",
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import _ from "lodash"
|
||||
import jwt from "jsonwebtoken"
|
||||
import { Validator } from "medusa-core-utils"
|
||||
import config from "../../../../config"
|
||||
@@ -19,7 +20,7 @@ import config from "../../../../config"
|
||||
* application/json:
|
||||
* schema:
|
||||
* properties:
|
||||
* customer:
|
||||
* user:
|
||||
* $ref: "#/components/schemas/user"
|
||||
*/
|
||||
export default async (req, res) => {
|
||||
@@ -46,5 +47,7 @@ export default async (req, res) => {
|
||||
expiresIn: "24h",
|
||||
})
|
||||
|
||||
res.json({ user: result.user })
|
||||
const cleanRes = _.omit(result.user, ["password_hash"])
|
||||
|
||||
res.json({ user: cleanRes })
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import passport from "passport"
|
||||
import _ from "lodash"
|
||||
|
||||
/**
|
||||
* @oas [get] /auth
|
||||
@@ -14,11 +14,13 @@ import passport from "passport"
|
||||
* application/json:
|
||||
* schema:
|
||||
* properties:
|
||||
* customer:
|
||||
* user:
|
||||
* $ref: "#/components/schemas/user"
|
||||
*/
|
||||
export default async (req, res) => {
|
||||
const userService = req.scope.resolve("userService")
|
||||
const user = await userService.retrieve(req.user.userId)
|
||||
res.status(200).json({ user })
|
||||
|
||||
const cleanRes = _.omit(user, ["password_hash"])
|
||||
res.status(200).json({ user: cleanRes })
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { defaultFields, defaultRelations } from "./"
|
||||
* summary: "Create a Swap"
|
||||
* description: "Creates a Swap. Swaps are used to handle Return of previously purchased goods and Fulfillment of replacements simultaneously."
|
||||
* parameters:
|
||||
* - (path) id=* {string} The id of the Swap.
|
||||
* - (path) id=* {string} The id of the Order.
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
|
||||
@@ -6,7 +6,7 @@ import { MedusaError, Validator } from "medusa-core-utils"
|
||||
* @oas [get] /orders
|
||||
* operationId: "GetOrders"
|
||||
* summary: "List Orders"
|
||||
* description: "Retrieves an list of Orders"
|
||||
* description: "Retrieves a list of Orders"
|
||||
* tags:
|
||||
* - Order
|
||||
* responses:
|
||||
@@ -16,8 +16,10 @@ import { MedusaError, Validator } from "medusa-core-utils"
|
||||
* application/json:
|
||||
* schema:
|
||||
* properties:
|
||||
* order:
|
||||
* $ref: "#/components/schemas/order"
|
||||
* orders:
|
||||
* type: array
|
||||
* items:
|
||||
* $ref: "#/components/schemas/order"
|
||||
*/
|
||||
export default async (req, res) => {
|
||||
const schema = Validator.orderFilter()
|
||||
|
||||
@@ -2,7 +2,7 @@ import { MedusaError, Validator } from "medusa-core-utils"
|
||||
import { defaultRelations, defaultFields } from "./"
|
||||
|
||||
/**
|
||||
* @oas [post] /return-reasons/:id
|
||||
* @oas [post] /return-reasons/{id}
|
||||
* operationId: "PostReturnReasonsReason"
|
||||
* summary: "Update a Return Reason"
|
||||
* description: "Updates a Return Reason"
|
||||
|
||||
@@ -5,6 +5,8 @@ import { defaultRelations, defaultFields } from "./"
|
||||
* operationId: "GetGiftCardsCode"
|
||||
* summary: "Retrieve Gift Card by Code"
|
||||
* description: "Retrieves a Gift Card by its associated unqiue code."
|
||||
* parameters:
|
||||
* - (path) code=* {string} The unique Gift Card code.
|
||||
* tags:
|
||||
* - Gift Card
|
||||
* responses:
|
||||
|
||||
@@ -2724,9 +2724,9 @@ domexception@^1.0.1:
|
||||
webidl-conversions "^4.0.2"
|
||||
|
||||
dot-prop@^4.1.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
|
||||
integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4"
|
||||
integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==
|
||||
dependencies:
|
||||
is-obj "^1.0.0"
|
||||
|
||||
@@ -3594,9 +3594,9 @@ has@^1.0.1, has@^1.0.3:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
highlight.js@^10.0.0:
|
||||
version "10.4.0"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.0.tgz#ef3ce475e5dfa7a48484260b49ea242ddab823a0"
|
||||
integrity sha512-EfrUGcQ63oLJbj0J0RI9ebX6TAITbsDBLbsjr881L/X5fMO9+oadKzEF21C7R3ULKG6Gv3uoab2HiqVJa/4+oA==
|
||||
version "10.5.0"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.5.0.tgz#3f09fede6a865757378f2d9ebdcbc15ba268f98f"
|
||||
integrity sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==
|
||||
|
||||
homedir-polyfill@^1.0.1:
|
||||
version "1.0.3"
|
||||
|
||||
Reference in New Issue
Block a user