fix: adds order by functionality to products (#1021)
* fix: adds order by functionality to products * feat: adds product tags list * fix: adds client and react support for product tags * fix: unit test * Update packages/medusa/src/services/product-tag.ts Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> * Update packages/medusa/src/services/product-tag.ts Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> * Update packages/medusa/src/services/product-tag.ts Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> * Update packages/medusa/src/services/product-tag.ts Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> * Update packages/medusa/src/services/product-tag.ts Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> * Update packages/medusa/src/services/product-tag.ts Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
1 parent
a81227fa74
commit
3bf32e5dc9
17 files changed
+498
-13
No files matched your search
@@ -20,6 +20,7 @@ import AdminShippingOptionsResource from "./shipping-options"
|
||||
import AdminRegionsResource from "./regions"
|
||||
import AdminNotificationsResource from "./notifications"
|
||||
import AdminUploadsResource from "./uploads"
|
||||
import AdminProductTagsResource from "./product-tags"
|
||||
|
||||
class Admin extends BaseResource {
|
||||
public auth = new AdminAuthResource(this.client)
|
||||
@@ -31,6 +32,7 @@ class Admin extends BaseResource {
|
||||
public invites = new AdminInvitesResource(this.client)
|
||||
public notes = new AdminNotesResource(this.client)
|
||||
public products = new AdminProductsResource(this.client)
|
||||
public productTags = new AdminProductTagsResource(this.client)
|
||||
public users = new AdminUsersResource(this.client)
|
||||
public returns = new AdminReturnsResource(this.client)
|
||||
public orders = new AdminOrdersResource(this.client)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import {
|
||||
AdminGetProductTagsParams,
|
||||
AdminProductTagsListRes,
|
||||
} from "@medusajs/medusa"
|
||||
import qs from "qs"
|
||||
import { ResponsePromise } from "../../typings"
|
||||
import BaseResource from "../base"
|
||||
|
||||
class AdminProductTagsResource extends BaseResource {
|
||||
list(
|
||||
query?: AdminGetProductTagsParams
|
||||
): ResponsePromise<AdminProductTagsListRes> {
|
||||
let path = `/admin/product-tags`
|
||||
|
||||
if (query) {
|
||||
const queryString = qs.stringify(query)
|
||||
path = `/admin/product-tags?${queryString}`
|
||||
}
|
||||
|
||||
return this.client.request("GET", path)
|
||||
}
|
||||
}
|
||||
|
||||
export default AdminProductTagsResource
|
||||
Reference in new issue
Block a user