fix logo not updating
This commit is contained in:
@@ -72,9 +72,17 @@ export function createTeamsService(pb: PocketBase) {
|
||||
|
||||
const result = await pb.collection("teams").update(id, data);
|
||||
|
||||
return transformTeam(await pb.collection("teams").getOne(result.id, {
|
||||
expand: "players, tournaments"
|
||||
}));
|
||||
if (data instanceof FormData && data.has('logo')) {
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
}
|
||||
|
||||
const updated = await pb.collection("teams").getOne(result.id, {
|
||||
expand: "players, tournaments",
|
||||
// @ts-ignore - Add cache busting
|
||||
$cancelKey: Date.now().toString()
|
||||
});
|
||||
|
||||
return transformTeam(updated);
|
||||
} catch (error) {
|
||||
logger.error("PocketBase | Error updating team", error);
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user