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:
db8200 2023-07-23 06:11:29 +02:00 committed by GitHub
parent 4b071bccda
commit 0eb0b283b2
4 changed files with 12 additions and 7 deletions

View file

@ -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>