mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-24 05:54:55 +03:00
feat: update return types
This commit is contained in:
parent
c38422f635
commit
4dcd97bce8
@ -4,8 +4,8 @@ import { HydraApi } from "@main/services";
|
|||||||
const undoFriendship = async (
|
const undoFriendship = async (
|
||||||
_event: Electron.IpcMainInvokeEvent,
|
_event: Electron.IpcMainInvokeEvent,
|
||||||
userId: string
|
userId: string
|
||||||
): Promise<void> => {
|
) => {
|
||||||
return HydraApi.delete(`/profile/friends/${userId}`);
|
await HydraApi.delete(`/profile/friends/${userId}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
registerEvent("undoFriendship", undoFriendship);
|
registerEvent("undoFriendship", undoFriendship);
|
||||||
|
@ -4,8 +4,8 @@ import { HydraApi } from "@main/services";
|
|||||||
const blockUser = async (
|
const blockUser = async (
|
||||||
_event: Electron.IpcMainInvokeEvent,
|
_event: Electron.IpcMainInvokeEvent,
|
||||||
userId: string
|
userId: string
|
||||||
): Promise<void> => {
|
) => {
|
||||||
return HydraApi.post(`/user/${userId}/block`);
|
await HydraApi.post(`/user/${userId}/block`);
|
||||||
};
|
};
|
||||||
|
|
||||||
registerEvent("blockUser", blockUser);
|
registerEvent("blockUser", blockUser);
|
||||||
|
@ -4,8 +4,8 @@ import { HydraApi } from "@main/services";
|
|||||||
const unblockUser = async (
|
const unblockUser = async (
|
||||||
_event: Electron.IpcMainInvokeEvent,
|
_event: Electron.IpcMainInvokeEvent,
|
||||||
userId: string
|
userId: string
|
||||||
): Promise<void> => {
|
) => {
|
||||||
return HydraApi.post(`/user/${userId}/unblock`);
|
await HydraApi.post(`/user/${userId}/unblock`);
|
||||||
};
|
};
|
||||||
|
|
||||||
registerEvent("unblockUser", unblockUser);
|
registerEvent("unblockUser", unblockUser);
|
||||||
|
Loading…
Reference in New Issue
Block a user