washday-sdk 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/staff/put.js +2 -2
- package/package.json +1 -1
- package/src/api/staff/put.ts +2 -2
package/dist/api/staff/put.js
CHANGED
|
@@ -14,13 +14,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.updateStoreStaffById = void 0;
|
|
16
16
|
const axiosInstance_1 = __importDefault(require("../axiosInstance"));
|
|
17
|
-
const updateStoreStaffById = function (storeId, data) {
|
|
17
|
+
const updateStoreStaffById = function (storeId, staffId, data) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
try {
|
|
20
20
|
const config = {
|
|
21
21
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
22
22
|
};
|
|
23
|
-
const response = yield axiosInstance_1.default.put(`api/store/${storeId}/staff`, data, config);
|
|
23
|
+
const response = yield axiosInstance_1.default.put(`api/store/${storeId}/staff/${staffId}`, data, config);
|
|
24
24
|
return response;
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
package/package.json
CHANGED
package/src/api/staff/put.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { WashdayClientInstance } from "../../interfaces/Api";
|
|
|
2
2
|
import { IStore } from "../../interfaces/Store";
|
|
3
3
|
import axiosInstance from "../axiosInstance";
|
|
4
4
|
|
|
5
|
-
export const updateStoreStaffById = async function (this: WashdayClientInstance, storeId: string, data: IStore): Promise<any> {
|
|
5
|
+
export const updateStoreStaffById = async function (this: WashdayClientInstance, storeId: string, staffId: string, data: IStore): Promise<any> {
|
|
6
6
|
try {
|
|
7
7
|
const config = {
|
|
8
8
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
9
9
|
};
|
|
10
|
-
const response = await axiosInstance.put(`api/store/${storeId}/staff`, data, config);
|
|
10
|
+
const response = await axiosInstance.put(`api/store/${storeId}/staff/${staffId}`, data, config);
|
|
11
11
|
return response;
|
|
12
12
|
} catch (error) {
|
|
13
13
|
console.error('Error fetching getStoreById:', error);
|