Resource Favorites
Manage favorite resources for authenticated users.
Base Endpoint
Section titled “Base Endpoint”Resource favorites endpoints are prefixed with /resources/:resourceId/favorites
Add to Favorites
Section titled “Add to Favorites”POST /resources/:resourceId/favoritesAdd a resource to your favorites.
Authentication: Required
URL Parameters:
resourceId(string) - Resource ID to favorite
Response:
{ "message": "Resource added to favorites", "favoriteCount": 15}Remove from Favorites
Section titled “Remove from Favorites”DELETE /resources/:resourceId/favoritesRemove a resource from your favorites.
Authentication: Required
URL Parameters:
resourceId(string) - Resource ID to unfavorite
Response:
{ "message": "Resource removed from favorites", "favoriteCount": 14}Check if Favorited
Section titled “Check if Favorited”GET /resources/:resourceId/favorites/meCheck if the current user has favorited the resource.
Authentication: Required
URL Parameters:
resourceId(string) - Resource ID
Response:
{ "hasFavorited": true}Get My Favorites
Section titled “Get My Favorites”GET /user/favoritesGet all favorite resources for the authenticated user.
Authentication: Required
Response:
{ "favorites": [ { "id": "favorite-id", "resourceId": "resource-id", "resource": { "id": "resource-id", "name": "Resource Name", "slug": "resource-slug", "shortDescription": "...", "iconUrl": "https://...", "type": "MOD" }, "createdAt": "2024-01-01T00:00:00Z" } ], "total": 10}