optional param

This commit is contained in:
Jörn-Michael Miehe 2022-09-12 22:22:40 +00:00
parent 07277602de
commit 8dac502da5
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
declare module 'vue/types/vue' {
interface Vue {
$ovdashboard: {
api_url: (endpoint: string) => string;
api_url: (endpoint?: string) => string;
}
}
}

View file

@ -18,7 +18,7 @@ class OVDashboardPlugin {
}
}
public api_url(endpoint: string | undefined): string {
public api_url(endpoint?: string): string {
if (endpoint === undefined)
return this.api_baseurl;