Fix image not being included for new predicted sets

This commit is contained in:
Brandon Presley 2022-09-30 13:29:33 +13:00
parent 6076e0014f
commit 4199bf0058
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ export default function SetForm({
saveImage = await getSets({search: name, limit: 1, offset: 0}).then(
([s]) => s?.image,
);
console.log(`${SetForm.name}.handleSubmit:`, {saveImage});
console.log(`${SetForm.name}.handleSubmit:`, {saveImage, name});
save({
name,
reps: Number(reps),

View File

@ -12,7 +12,7 @@ export const getBestSet = async (name: string): Promise<Set> => {
GROUP BY name;
`;
const bestReps = `
SELECT name, MAX(reps) as reps, unit, weight, sets, minutes, seconds
SELECT name, MAX(reps) as reps, unit, weight, sets, minutes, seconds, image
FROM sets
WHERE name = ? AND weight = ?
GROUP BY name;