forked from mirrors/homebox
fix 3 places where API URLs were not constructed by function route (#451)
* Fixed 3 places where API URLs were not constructed by function route(path, params).
* autofix
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
Former-commit-id: 06eb6c1f91
This commit is contained in:
parent
4b071bccda
commit
0eb0b283b2
4 changed files with 12 additions and 7 deletions
|
@ -15,10 +15,12 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { route } from "../../lib/api/base";
|
||||
|
||||
function getQRCodeUrl(): string {
|
||||
const currentURL = window.location.href;
|
||||
|
||||
return `/api/v1/qrcode?data=${encodeURIComponent(currentURL)}`;
|
||||
return route(`/qrcode`, { data: encodeURIComponent(currentURL) });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue