Inventaire API: display search image
This commit is contained in:
@@ -3,8 +3,13 @@ import { useAuthStore } from './auth.store.js'
|
||||
const baseUrl = "http://localhost:8080"
|
||||
|
||||
export function getImagePathOrDefault(path) {
|
||||
return (path == "" || typeof path === 'undefined') ?
|
||||
"../defaultbook.png" : baseUrl + path;
|
||||
if (path == "" || typeof path === 'undefined') {
|
||||
return "../defaultbook.png";
|
||||
} else if (path.startsWith("https://")) {
|
||||
return path;
|
||||
} else {
|
||||
return baseUrl + path;
|
||||
}
|
||||
}
|
||||
|
||||
function useFetch(data, error, url) {
|
||||
|
||||
Reference in New Issue
Block a user