feat(frontend): Prettier, add openapi client generation
This commit is contained in:
@@ -9,12 +9,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password-login">Passwort:</label>
|
||||
<input
|
||||
type="password"
|
||||
id="password-login"
|
||||
v-model="password"
|
||||
required
|
||||
/>
|
||||
<input type="password" id="password-login" v-model="password" required />
|
||||
</div>
|
||||
|
||||
<button type="submit">Login</button>
|
||||
@@ -23,34 +18,34 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { ref } from 'vue'
|
||||
|
||||
const email = ref("");
|
||||
const password = ref("");
|
||||
const email = ref('')
|
||||
const password = ref('')
|
||||
|
||||
const handleLogin = () => {
|
||||
if (!email.value || !password.value) {
|
||||
alert("Bitte alle Felder ausfüllen");
|
||||
return;
|
||||
alert('Bitte alle Felder ausfüllen')
|
||||
return
|
||||
}
|
||||
authClient.signIn.email(
|
||||
{
|
||||
email: email.value,
|
||||
password: password.value,
|
||||
password: password.value
|
||||
},
|
||||
{
|
||||
onRequest: (ctx) => {
|
||||
console.log("Sending login request", ctx);
|
||||
console.log('Sending login request', ctx)
|
||||
},
|
||||
onSuccess: (ctx) => {
|
||||
console.log("Successfully logged in!");
|
||||
console.log('Successfully logged in!')
|
||||
},
|
||||
onError: (ctx) => {
|
||||
console.log(ctx.error.message);
|
||||
},
|
||||
},
|
||||
);
|
||||
};
|
||||
console.log(ctx.error.message)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -19,12 +19,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label for="confirmPassword">Passwort bestätigen:</label>
|
||||
<input
|
||||
type="password"
|
||||
id="confirmPassword"
|
||||
v-model="confirmPassword"
|
||||
required
|
||||
/>
|
||||
<input type="password" id="confirmPassword" v-model="confirmPassword" required />
|
||||
</div>
|
||||
|
||||
<button type="submit">Registrieren</button>
|
||||
@@ -33,46 +28,41 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { ref } from 'vue'
|
||||
|
||||
const username = ref("");
|
||||
const email = ref("");
|
||||
const password = ref("");
|
||||
const confirmPassword = ref("");
|
||||
const username = ref('')
|
||||
const email = ref('')
|
||||
const password = ref('')
|
||||
const confirmPassword = ref('')
|
||||
|
||||
const handleRegister = () => {
|
||||
if (
|
||||
!username.value ||
|
||||
!email.value ||
|
||||
!password.value ||
|
||||
!confirmPassword.value
|
||||
) {
|
||||
alert("Bitte alle Felder ausfüllen");
|
||||
return;
|
||||
if (!username.value || !email.value || !password.value || !confirmPassword.value) {
|
||||
alert('Bitte alle Felder ausfüllen')
|
||||
return
|
||||
}
|
||||
if (password.value !== confirmPassword.value) {
|
||||
alert("Passwörter stimmen nicht überein");
|
||||
return;
|
||||
alert('Passwörter stimmen nicht überein')
|
||||
return
|
||||
}
|
||||
authClient.signUp.email(
|
||||
{
|
||||
email: email.value,
|
||||
password: password.value,
|
||||
name: username.value,
|
||||
name: username.value
|
||||
},
|
||||
{
|
||||
onRequest: (ctx) => {
|
||||
console.log("Sending register request", ctx);
|
||||
console.log('Sending register request', ctx)
|
||||
},
|
||||
onSuccess: (ctx) => {
|
||||
console.log("Successfully registered!");
|
||||
console.log('Successfully registered!')
|
||||
},
|
||||
onError: (ctx) => {
|
||||
console.log(ctx.error.message);
|
||||
},
|
||||
},
|
||||
);
|
||||
};
|
||||
console.log(ctx.error.message)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user