feat: Introduce application version display in the frontend footer, showing both frontend and backend versions with integrated build arguments.
All checks were successful
Release and Build Docker Images / release-and-build (push) Successful in 1m29s
All checks were successful
Release and Build Docker Images / release-and-build (push) Successful in 1m29s
This commit is contained in:
@@ -33,3 +33,11 @@ export const deleteTodo = async (id) => {
|
||||
if (!response.ok) throw new Error('Failed to delete todo');
|
||||
return true;
|
||||
};
|
||||
|
||||
export const getVersion = async () => {
|
||||
// Use the origin to ensure it accesses the /api/version correctly regardless of environment
|
||||
const VERSION_URL = BASE_URL.replace('/todos', '/version');
|
||||
const response = await fetch(VERSION_URL);
|
||||
if (!response.ok) throw new Error('Failed to fetch version');
|
||||
return response.json();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user