feat(pokemon): add image selection and display from pokesprite
Add image metadata fields to Pokemon schema and API Implement image candidate fetching from pokesprite static tree Add Pokédex-style image picker to edit form and display in details
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
deletePokemon,
|
||||
deleteRecipe,
|
||||
fetchPokemonData,
|
||||
fetchPokemonImageOptions,
|
||||
getHabitat,
|
||||
getItem,
|
||||
getOptions,
|
||||
@@ -372,6 +373,11 @@ app.post('/api/pokemon/fetch', async (request, reply) => {
|
||||
return user ? fetchPokemonData(request.body as Record<string, unknown>, user.id) : undefined;
|
||||
});
|
||||
|
||||
app.post('/api/pokemon/image-options', async (request, reply) => {
|
||||
const user = await requireVerifiedUser(request, reply);
|
||||
return user ? fetchPokemonImageOptions(request.body as Record<string, unknown>) : undefined;
|
||||
});
|
||||
|
||||
app.put('/api/pokemon/:id', async (request, reply) => {
|
||||
const user = await requireVerifiedUser(request, reply);
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user