[Glitch] Fix the delete suggestion button not working and using a deprecated endpoint
Port d81983f181c5051804438c99a27be5939e293cff to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
4f759ad2c3
commit
f4371ee3bb
@ -5,4 +5,4 @@ export const apiGetSuggestions = (limit: number) =>
|
||||
apiRequestGet<ApiSuggestionJSON[]>('v2/suggestions', { limit });
|
||||
|
||||
export const apiDeleteSuggestion = (accountId: string) =>
|
||||
apiRequestDelete(`v1/suggestions/${accountId}`);
|
||||
apiRequestDelete(`v2/suggestions/${accountId}`);
|
||||
|
||||
@ -25,7 +25,7 @@ export const Card = ({ id, source }) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const handleDismiss = useCallback(() => {
|
||||
dispatch(dismissSuggestion(id));
|
||||
dispatch(dismissSuggestion({ accountId: id }));
|
||||
}, [id, dispatch]);
|
||||
|
||||
let label;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user