Fix: updated pinnedDate logic, set default values for pagination, deleted comments, deleted example in user-profile-context

This commit is contained in:
Moyasee
2025-09-25 15:44:11 +03:00
parent 355d38c0a2
commit eea701f046
3 changed files with 7 additions and 13 deletions

View File

@@ -5,18 +5,13 @@ import type { UserLibraryResponse } from "@types";
const getUserLibrary = async (
_event: Electron.IpcMainInvokeEvent,
userId: string,
take?: number,
skip?: number
take: number = 12,
skip: number = 0
): Promise<UserLibraryResponse | null> => {
const params = new URLSearchParams();
if (take !== undefined) {
params.append("take", take.toString());
}
if (skip !== undefined) {
params.append("skip", skip.toString());
}
params.append("take", take.toString());
params.append("skip", skip.toString());
const queryString = params.toString();
const baseUrl = `/users/${userId}/library`;