Skip to content

Commit c79882e

Browse files
committed
Update endpoint method
1 parent a1a5313 commit c79882e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Networking/Networking/Remote/ProductsRemote.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public final class ProductsRemote: Remote, ProductsRemoteProtocol {
357357
public func createTemplateProduct(for siteID: Int64, template: ProductsRemote.TemplateType, completion: @escaping (Result<Int64, Error>) -> Void) {
358358
let parameters = [ParameterKey.templateName: template.rawValue]
359359
let path = Path.templateProducts
360-
let request = JetpackRequest(wooApiVersion: .wcAdmin, method: .get, siteID: siteID, path: path, parameters: parameters)
360+
let request = JetpackRequest(wooApiVersion: .wcAdmin, method: .post, siteID: siteID, path: path, parameters: parameters)
361361
let mapper = EntityIDMapper()
362362

363363
enqueue(request, mapper: mapper, completion: completion)

Yosemite/Yosemite/Stores/ProductStore.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ private extension ProductStore {
413413
}
414414

415415
/// Creates a product using the provided template type.
416+
/// The created product is not stored locally.
416417
///
417418
func createTemplateProduct(siteID: Int64, template: ProductsRemote.TemplateType, onCompletion: @escaping (Result<Product, Error>) -> Void) {
418419
remote.createTemplateProduct(for: siteID, template: template) { [remote] result in

0 commit comments

Comments
 (0)