refactor(#89): Address PR comments

This commit is contained in:
Josh Creek
2026-01-24 17:40:59 +00:00
parent 86e8d6f5e6
commit e55d511141
2 changed files with 8 additions and 3 deletions
@@ -48,9 +48,14 @@ export const PUT = async (event: RequestEvent) => {
.is('pokedexId', null)
.eq('provider', provider)
.select('id, provider, enabled, fileName, folderId, path, metadata, lastExportedAt, lastError')
.single();
.maybeSingle();
if (error || !data) {
if (error) {
console.error(error);
return json({ error: 'Internal Server Error' }, { status: 500 });
}
if (data === null) {
return json({ error: 'Integration not found' }, { status: 404 });
}
@@ -35,7 +35,7 @@ export const GET = async (event: RequestEvent) => {
if (!clientId) {
const missingClientRedirect = pokedexId
? `/pokedex/${pokedexId}?export=google-missing-client`
: '/pokedex?export=google-missing-client';
: '/backup-settings?export=google-missing-client';
throw redirect(302, missingClientRedirect);
}