Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Daniel-Stojanovski/finkiopendesk/llms.txt
Use this file to discover all available pages before exploring further.
FinkiOpenDesk provides two personalization features: favorites and voting. Favorites let you bookmark any subject, profession, or channel discussion so you can return to it quickly. Voting lets you rate how relevant a subject is for a specific profession, contributing to the community-driven career guide. Both features require an active login and use a toggle model — performing the action a second time reverses it.
You must be logged in to use favorites or voting. The backend identifies you through the authenticated session. Requests made without a valid session will be rejected.
What you can favorite
Favorites support three target types, defined by the UserFavoriteDto:interface UserFavoriteDto {
targetId: string;
targetType: "subject" | "profession" | "channel";
targetName?: string;
}
| Target type | What it represents |
|---|
subject | An academic course and its discussion |
profession | A career profession and its discussion |
channel | A topic channel within a subject discussion |
Toggle behavior
Favoriting is a toggle. If the item is not yet in your favorites, it is added. If it is already favorited, it is removed. The same endpoint handles both cases:curl -X POST https://api.finkiopendesk.onrender.com/api/favorites/{userId}/set \
-H "Content-Type: application/json" \
-d '{"targetId": "{targetId}", "targetType": "subject"}'
The response returns the created UserFavorite record when adding, or nothing when removing.Reading favorites
Your current favorites are loaded when you log in and kept in the application’s user data context. The discussion list view uses this data to mark favorited items visually without additional requests.curl https://api.finkiopendesk.onrender.com/api/favorites/{userId}
Returns an array of UserFavorite objects for the user.How favorites appear in the UI
Discussion cards in the forum and career guide show a visual indicator when the item is in your favorites. The check is done locally by comparing targetId and targetType against your loaded favorites list:const isFavorite = favorites.some(
f => f.targetId === targetId && f.targetType === targetType
);
What voting affects
Votes are cast on subjects within a specific profession context. Each vote is scoped to a (professionId, subjectId) pair, so the same subject can have different vote counts across different professions.interface VoteDto {
voteId: string;
subjectId: string | null;
professionId: string | null;
}
Toggle behavior
Voting is a toggle. Submitting a vote for a subject you have already voted on in the same profession context removes your vote. There is no separate endpoint to withdraw — you simply vote again.curl -X POST https://api.finkiopendesk.onrender.com/api/subjects/vote \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"subjectId": "{subjectId}", "professionId": "{professionId}"}'
A 200 OK response returns the new VoteDto. A 204 No Content response means the vote was removed.Reading vote counts
All votes for a profession (used to display totals on subject cards):curl https://api.finkiopendesk.onrender.com/api/votes/pid/{professionId}
Returns [{ subjectId, voteCount }, ...].Your votes within a profession (used to highlight which subjects you have voted on):curl https://api.finkiopendesk.onrender.com/api/votes/pid/{professionId}/{userId}
Returns [{ subjectId, vote }, ...] for the authenticated user.All votes by a user (across all professions):curl https://api.finkiopendesk.onrender.com/api/votes/{userId}
Where votes appear
The career guide’s Voting tab inside a profession view shows all associated subjects with their aggregate vote counts. The subject cards use the vote data loaded at page open — switching to the Voting tab triggers no additional requests because vote data is fetched alongside the profession data when the profession view first loads.
Comparison
| Favorites | Voting |
|---|
| Targets | subject, profession, channel | subject within a profession context |
| Scope | Per user | Per user, per profession-subject pair |
| Toggle | Yes | Yes |
| Requires login | Yes | Yes |
| Visible to others | No (personal list) | Yes (aggregate vote counts are public) |