Skip to content
19 changes: 17 additions & 2 deletions client/src/api/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const getGalleryVideos = async (userId: number): Promise<ApiResponse<Gall
*/
export const postGalleryImage = async (userId: number, imageData: AddGalleryImageInput): Promise<ApiResponse<GalleryImage>> => {
const apiURL = `/me/gallery/${userId}/images`;

const form = new FormData();
for (const [name, value] of Object.entries(imageData)) {
if (value !== null) form.append(name, value);
Expand Down Expand Up @@ -439,13 +439,28 @@ export const updateTagExclusion = async (
newBlacklist: UpdateTagBlacklistInput
): Promise<ApiResponse<Tag[]>> => {
const url = `/me/tag-blacklist`;
const response = await POST(url, newBlacklist);
const response = await PATCH(url, newBlacklist);

if (response.error) console.log(`Error in updateTagBlacklist: ${response.error}`);
//console.log(response);
return response as ApiResponse<Tag[]>;
};

/**
* Gets a list of all tags
* @returns API response, data is Tag[]
*/
export const getAllTags = async () => {
const URL = `/datasets/tags`;
const res = await GET(URL);

if (res.error) {
console.log(`Error in getAllTags: ${res.error}`);
}

return res;
}

//#endregion

// #region PROJECT FOLLOWINGS/VISIBILITY
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/TagDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Medium, Skill, Tag } from "@looking-for-group/shared";
* @param type - the broader grouper, in a string format to allow for all type data types
* @param category - the more specific grouper, in a string format to allow for all category data types
*/
type TagOrSkill = {
export type TagOrSkill = {
label: string;
id: number;
type: string;
Expand Down Expand Up @@ -114,7 +114,7 @@ const CatOrder: Record<string, number> = {
* @param searchValue - the value of the search bar present in the tag/skill menu
* @param searchData - the returned array of tags/skills found by the search bar
*/
interface TagDisplayProps {
export interface TagDisplayProps {
selected: TagOrSkill[];
toggleTag: (id: number, type: string) => void;
tabs: string[];
Expand Down
Loading
Loading