Public Access
feat(audit): game catalog search and time to beat correction
New page /audit/games: search every game and open the correction dialog without owning it. Time to beat as hours + minutes. Audit log game links open /audit/games?appid=. Menu entry next to the link queue.
This commit is contained in:
1 parent
6627a8db66
commit
0c300c455d
14 files changed
+439
-19
No files matched your search
@@ -41,3 +41,18 @@ export const resetCorrection = (appid, field) => apiFetch(url(appid, field), {me
|
||||
export const mergeGame = (appid, otherAppid) =>
|
||||
apiFetch(`${import.meta.env.VITE_CORE_API_URL}/api/library/games/${appid}/merge`,
|
||||
{method: 'POST', headers: JSON_HEADERS, body: JSON.stringify({otherAppid})});
|
||||
|
||||
/**
|
||||
* GET: 200 `{content: [{appid, name, imageUrl, platforms}], totalPages}` of every game some user has, 403 below
|
||||
* AUDITOR. A blank q means all.
|
||||
*/
|
||||
export const searchCatalog = ({q, page, size}, signal) => {
|
||||
const params = new URLSearchParams({page: String(page), size: String(size)});
|
||||
if (q?.trim()) params.set('q', q.trim());
|
||||
return apiFetch(`${import.meta.env.VITE_CORE_API_URL}/api/library/catalog?${params}`, {signal});
|
||||
};
|
||||
|
||||
/**
|
||||
* GET: 200 what GameCorrectionDialog reads (like the game details), 403 below AUDITOR, 404 GAME_NOT_FOUND.
|
||||
*/
|
||||
export const fetchCatalogGame = (appid) => apiFetch(`${import.meta.env.VITE_CORE_API_URL}/api/library/catalog/${appid}`);
|
||||
@@ -23,6 +23,8 @@ export const MAX_GAME_SEARCH_LENGTH = 100;
|
||||
export const MAX_LIBRARY_SEARCH_LENGTH = 100;
|
||||
// Core GameCorrectionService.MAX_TEXT
|
||||
export const MAX_CORRECTION_LENGTH = 512;
|
||||
// Core GameCorrectionService.MAX_TIME_TO_BEAT_MINUTES
|
||||
export const MAX_TIME_TO_BEAT_MINUTES = 60_000;
|
||||
// Core GameCorrectionService.MAX_GENRES
|
||||
export const MAX_CORRECTION_GENRES = 10;
|
||||
|
||||
|
||||
Reference in new issue
Block a user