Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Duplicated code #567

@orballo

Description

@orballo

Hi there,

I was just having a look at the code and I noticed that this part is duplicated, or at least overridden by the next lines, as the keys users and invites are defined again after this code:

admin/src/services/api.js

Lines 682 to 733 in 8189ab1

invites: {
create(data) {
const path = `/admin/invites`
return medusaRequest("POST", path, data)
},
resend(inviteId) {
const path = `/admin/invites/${inviteId}/resend`
return medusaRequest("POST", path)
},
delete(inviteId) {
const path = `/admin/invites/${inviteId}`
return medusaRequest("DELETE", path)
},
list() {
const path = `/admin/invites`
return medusaRequest("GET", path)
},
accept(data) {
const path = `/admin/invites/accept`
return medusaRequest("POST", path, data)
},
},
users: {
resetPasswordToken(data) {
const path = `/admin/users/password-token`
return medusaRequest("POST", path, data)
},
resetPassword(data) {
const path = `/admin/users/reset-password`
return medusaRequest("POST", path, data)
},
list() {
const path = `/admin/users`
return medusaRequest("GET", path)
},
retrieve(userId) {
const path = `/admin/users/${userId}`
return medusaRequest("GET", path)
},
update(userId, data) {
const path = `/admin/users/${userId}`
return medusaRequest("POST", path, data)
},
delete(userId) {
const path = `/admin/users/${userId}`
return medusaRequest("DELETE", path)
},
},

I thought it would be good to let you know :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: choreUpdating packages, cleanup, etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions