feat(backlog): save only the changed fields

This commit is contained in:
lobo committed 2026-09-30 07:57:52 +02:00
1 parent 9ddc50f819
commit 628920a006
6 files changed
+133 -83

No files matched your search

+2 -4
View File
@@ -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'));