Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit af53bb7

Browse files
committedApr 25, 2025·
prettier
1 parent 570ebaa commit af53bb7

File tree

1 file changed

+31
-48
lines changed

1 file changed

+31
-48
lines changed
 

‎src/store/main.ts

Lines changed: 31 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,7 @@ export class MainStore {
708708
search: uiStore.searchText ?? ''
709709
};
710710

711-
const query2 = makeQueryParams(
712-
queryLimit,
713-
params ? queryParams : this.getWantedsPrevParams
714-
);
711+
const query2 = makeQueryParams(queryLimit, params ? queryParams : this.getWantedsPrevParams);
715712

716713
try {
717714
const ps2 = await api.get(`gobounties/all?${query2}`);
@@ -790,24 +787,24 @@ export class MainStore {
790787
}
791788

792789
// if we don't pass the params, we should use previous params for invalidate query
793-
const query2 = makeQueryParams(
794-
queryLimit,
795-
queryParams
796-
);
790+
const query2 = makeQueryParams(queryLimit, queryParams);
797791

798792
try {
799793
if (!uiStore.meInfo) return 0;
800794
const info = uiStore.meInfo;
801795

802-
const response = await fetch(`${TribesURL}/features/${feature_uuid}/phase/${phase_uuid}/bounty?${query2}`, {
803-
method: 'GET',
804-
mode: 'cors',
805-
headers: {
806-
'x-jwt': info.tribe_jwt,
807-
'Content-Type': 'application/json',
808-
'x-session-id': this.getSessionId()
796+
const response = await fetch(
797+
`${TribesURL}/features/${feature_uuid}/phase/${phase_uuid}/bounty?${query2}`,
798+
{
799+
method: 'GET',
800+
mode: 'cors',
801+
headers: {
802+
'x-jwt': info.tribe_jwt,
803+
'Content-Type': 'application/json',
804+
'x-session-id': this.getSessionId()
805+
}
809806
}
810-
});
807+
);
811808

812809
if (!response.ok) {
813810
console.log('fetch failed getPhaseBounties: ', response.statusText);
@@ -874,15 +871,18 @@ export class MainStore {
874871
if (!uiStore.meInfo) return 0;
875872
const info = uiStore.meInfo;
876873

877-
const response = await fetch(`${TribesURL}/features/${feature_uuid}/phase/${phase_uuid}/bounty/count?Open=${open}&Assigned=${assigned}&Paid=${paid}`, {
878-
method: 'GET',
879-
mode: 'cors',
880-
headers: {
881-
'x-jwt': info.tribe_jwt,
882-
'Content-Type': 'application/json',
883-
'x-session-id': this.getSessionId()
874+
const response = await fetch(
875+
`${TribesURL}/features/${feature_uuid}/phase/${phase_uuid}/bounty/count?Open=${open}&Assigned=${assigned}&Paid=${paid}`,
876+
{
877+
method: 'GET',
878+
mode: 'cors',
879+
headers: {
880+
'x-jwt': info.tribe_jwt,
881+
'Content-Type': 'application/json',
882+
'x-session-id': this.getSessionId()
883+
}
884884
}
885-
});
885+
);
886886

887887
if (!response.ok) {
888888
console.log('fetch failed getTotalPhaseBountyCount: ', response.statusText);
@@ -1272,10 +1272,7 @@ export class MainStore {
12721272
};
12731273

12741274
// if we don't pass the params, we should use previous params for invalidate query
1275-
const query2 = makeQueryParams(
1276-
orgQuerLimit,
1277-
params ? queryParams : undefined,
1278-
);
1275+
const query2 = makeQueryParams(orgQuerLimit, params ? queryParams : undefined);
12791276
try {
12801277
const ps2 = await api.get(`workspaces/bounties/${uuid}?${query2}`);
12811278
const ps3: any[] = [];
@@ -1988,8 +1985,7 @@ export class MainStore {
19881985
async getWorkspaceNextBountyByCreated(org_uuid: string, created: number): Promise<number> {
19891986
try {
19901987
const workspaceBountiesStatus =
1991-
JSON.parse(localStorage.getItem('workspaceBountyStatus') || `{}`) ||
1992-
defaultBountyStatus;
1988+
JSON.parse(localStorage.getItem('workspaceBountyStatus') || `{}`) || defaultBountyStatus;
19931989
const params = { languages: this.bountyLanguages, ...workspaceBountiesStatus };
19941990

19951991
const queryParams: QueryParams = {
@@ -2002,10 +1998,7 @@ export class MainStore {
20021998
};
20031999

20042000
// if we don't pass the params, we should use previous params for invalidate query
2005-
const query = makeQueryParams(
2006-
queryLimit,
2007-
queryParams
2008-
);
2001+
const query = makeQueryParams(queryLimit, queryParams);
20092002

20102003
const bounty = await api.get(`gobounties/workspace/next/${org_uuid}/${created}?${query}`);
20112004
return bounty;
@@ -2018,8 +2011,7 @@ export class MainStore {
20182011
async getWorkspacePreviousBountyByCreated(org_uuid: string, created: number): Promise<number> {
20192012
try {
20202013
const workspaceBountiesStatus =
2021-
JSON.parse(localStorage.getItem('workspaceBountyStatus') || `{}`) ||
2022-
defaultBountyStatus;
2014+
JSON.parse(localStorage.getItem('workspaceBountyStatus') || `{}`) || defaultBountyStatus;
20232015
const params = { languages: this.bountyLanguages, ...workspaceBountiesStatus };
20242016

20252017
const queryParams: QueryParams = {
@@ -2032,10 +2024,7 @@ export class MainStore {
20322024
};
20332025

20342026
// if we don't pass the params, we should use previous params for invalidate query
2035-
const query = makeQueryParams(
2036-
queryLimit,
2037-
queryParams
2038-
);
2027+
const query = makeQueryParams(queryLimit, queryParams);
20392028

20402029
const bounty = await api.get(`gobounties/workspace/previous/${org_uuid}/${created}?${query}`);
20412030
return bounty;
@@ -2083,10 +2072,7 @@ export class MainStore {
20832072
};
20842073

20852074
// if we don't pass the params, we should use previous params for invalidate query
2086-
const query = makeQueryParams(
2087-
queryLimit,
2088-
queryParams
2089-
);
2075+
const query = makeQueryParams(queryLimit, queryParams);
20902076
const bounty = await api.get(`gobounties/previous/${created}?${query}`);
20912077
return bounty;
20922078
} catch (e) {
@@ -3287,10 +3273,7 @@ export class MainStore {
32873273
};
32883274

32893275
// if we don't pass the params, we should use previous params for invalidate query
3290-
const query = makeQueryParams(
3291-
featureLimit,
3292-
queryParams
3293-
);
3276+
const query = makeQueryParams(featureLimit, queryParams);
32943277

32953278
const r: any = await fetch(`${TribesURL}/features/forworkspace/${uuid}?${query}`, {
32963279
method: 'GET',

0 commit comments

Comments
 (0)
Please sign in to comment.