Public Access
feat(backlog): save only the changed fields
This commit is contained in:
1 parent
9ddc50f819
commit
628920a006
6 files changed
+133
-83
No files matched your search
@@ -5,7 +5,7 @@ import {Gamepad2, Loader2} from 'lucide-react';
|
||||
|
||||
import {Button} from '@/components/ui/button';
|
||||
import {Card} from '@/components/ui/card';
|
||||
import {saveBacklogEntry} from '../utils/backlog.js';
|
||||
import {saveGameStatus} from '../utils/backlog.js';
|
||||
import {formatPlaytime} from '../utils/games.js';
|
||||
|
||||
/**
|
||||
@@ -22,9 +22,7 @@ export default function PlayingHint({game, onChanged}) {
|
||||
const setPlaying = async () => {
|
||||
setBusy(true);
|
||||
try {
|
||||
const response = await saveBacklogEntry(game.appid, {
|
||||
status: 'PLAYING', rating: game.rating ?? null, notes: game.notes ?? null, priority: game.priority ?? null,
|
||||
});
|
||||
const response = await saveGameStatus(game.appid, 'PLAYING');
|
||||
if (response.status === 401) return;
|
||||
if (!response.ok) {
|
||||
toast.error(t('BACKLOG.SAVE_FAILED'));
|
||||
|
||||
Reference in new issue
Block a user