mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-25 18:25:40 -05:00
fix: small fixes
This commit is contained in:
@@ -5,7 +5,7 @@ const route = useRoute();
|
||||
const redirect = route.query.redirect;
|
||||
const registerURI = `/account/register${redirect ? `?redirect=${redirect}` : ''}`;
|
||||
|
||||
const loginForm = reactive({ username: null, password: null });
|
||||
const loginForm = reactive({ username: '', password: '' });
|
||||
const errorMessage = ref<string | null>();
|
||||
|
||||
async function loginSubmission() {
|
||||
@@ -61,12 +61,6 @@ async function loginSubmission() {
|
||||
class="pwdreset"
|
||||
>{{ $t("account.loginForm.forgotPassword") }}</a>
|
||||
</div>
|
||||
<input
|
||||
id="redirect"
|
||||
name="redirect"
|
||||
type="hidden"
|
||||
:value="redirect"
|
||||
>
|
||||
<div class="buttons">
|
||||
<button type="submit">
|
||||
<!-- TODO: loading state on button. ... style maybe? -->
|
||||
|
||||
@@ -11,8 +11,9 @@ export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event);
|
||||
|
||||
try {
|
||||
const apiResponse = await $fetch<LoginCCResponse>(`${useRuntimeConfig(event).apiBase}/v1/login`, {
|
||||
const apiResponse = await $fetch<LoginCCResponse>(`/v1/login`, {
|
||||
method: 'POST',
|
||||
baseURL: useRuntimeConfig(event).apiBase,
|
||||
body: { ...body, grant_type: 'password' }
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user