Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 32d5814

Browse files
committed
fix: issue #72
1 parent 2f718b0 commit 32d5814

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/constants/workPeriods.js

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ export const API_REQUIRED_FIELDS = [
4545
"billingAccountId",
4646
"workPeriods.id",
4747
"workPeriods.projectId",
48-
"workPeriods.isLastWeek",
49-
"workPeriods.isFirstWeek",
5048
"workPeriods.userHandle",
5149
"workPeriods.startDate",
5250
"workPeriods.endDate",

src/services/workPeriods.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import axios, { CancelToken } from "./axios";
22
import {
33
API_CHALLENGE_PAYMENT_STATUS,
4-
API_QUERY_PARAM_NAMES,
54
JOBS_API_URL,
65
PAYMENTS_API_URL,
76
PROJECTS_API_URL,
@@ -101,7 +100,7 @@ export const fetchResourceBookings = (params) => {
101100
const source = CancelToken.source();
102101
return [
103102
axios.get(
104-
`${RB_API_URL}?${buildRequestQuery(params, API_QUERY_PARAM_NAMES)}`,
103+
`${RB_API_URL}?${buildRequestQuery(params)}`,
105104
{ cancelToken: source.token }
106105
),
107106
source,

src/utils/misc.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,11 @@ export function updateOptionMap(oldOptions, newOptions) {
116116
* that are not numbers and are falsy are ignored.
117117
*
118118
* @param {Object} params query parameters object
119-
* @param {string[]} paramNames array of valid query parameter names
120119
* @returns {string} query string
121120
*/
122-
export const buildRequestQuery = (params, paramNames) => {
121+
export const buildRequestQuery = (params) => {
123122
const queryParams = [];
124-
for (const paramName of paramNames) {
123+
for (const paramName in params) {
125124
const paramValue = params[paramName];
126125
if (
127126
!(paramName in params) ||

0 commit comments

Comments
 (0)