Skip to content

Commit

Permalink
#3013 merge conflcits
Browse files Browse the repository at this point in the history
  • Loading branch information
superhvarn committed Jan 1, 2025
2 parents ac8253d + 5255209 commit 237450d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
21 changes: 8 additions & 13 deletions src/frontend/src/apis/onboarding.api.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Checklist } from 'shared';
import { apiUrls } from '../utils/urls';
import axios from '../utils/axios';
import { ChecklistCreateArgs } from '../hooks/onboarding.hook';
import { ToggleChecklistPayload } from '../hooks/onboarding.hook';
import { ChecklistCreateArgs, ToggleChecklistPayload } from '../hooks/onboarding.hook';

/**
* API call to fetch all the checklists
Expand Down Expand Up @@ -32,7 +31,6 @@ export const getCheckedChecklists = () => {
};

/**
>>>>>>> feature/recruitment_and_onboarding
* API call to fetch all the users checklists
*/
export const getUsersChecklists = () => {
Expand All @@ -42,9 +40,14 @@ export const getUsersChecklists = () => {
};

/**
* API call to create a checklist
* @param payload the checklist data
* API call to toggle a checklist
*/
export const toggleChecklist = (payload: ToggleChecklistPayload) => {
return axios.post<Checklist>(apiUrls.toggleChecklist(payload.checklistId), {
...payload
});
};

export const createChecklist = (payload: ChecklistCreateArgs) => {
return axios.post(apiUrls.createChecklist(), {
...payload
Expand All @@ -59,14 +62,6 @@ export const editChecklist = (checklistId: string, payload: ChecklistCreateArgs)
...payload
});
};
/**
* API call to toggle a checklist
*/
export const toggleChecklist = (payload: ToggleChecklistPayload) => {
return axios.post<Checklist>(apiUrls.toggleChecklist(payload.checklistId), {
...payload
});
};

/**
* API Call to download a google image
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/hooks/onboarding.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
getUsersChecklists,
downloadGoogleImage,
toggleChecklist,
getCheckedChecklists,
createChecklist,
editChecklist
editChecklist,
getCheckedChecklists
} from '../apis/onboarding.api';

export interface ToggleChecklistPayload {
Expand Down

0 comments on commit 237450d

Please sign in to comment.