-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
93 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ const schema = z.object({ | |
type Schema = z.output<typeof schema> | ||
const state = ref({ | ||
email: undefined, | ||
password: undefined, | ||
email: '[email protected]', | ||
password: 'apibeer', | ||
}) | ||
const form = ref<Form<Schema>>() | ||
|
@@ -23,8 +23,7 @@ async function onSubmit(event: FormSubmitEvent<Schema>) { | |
const { email, password } = event.data | ||
submiting.value = true | ||
try { | ||
// TODO: Use `cookie` auth strategy | ||
const _user = await $client.auth.login.mutate({ | ||
await $client.auth.login.mutate({ | ||
email, | ||
password, | ||
}) | ||
|
@@ -62,7 +61,7 @@ async function onSubmit(event: FormSubmitEvent<Schema>) { | |
<UInput v-model="state.email" placeholder="[email protected]" icon="i-heroicons-envelope" /> | ||
</UFormGroup> | ||
<UFormGroup label="Password" name="password"> | ||
<UInput v-model="state.password" placeholder="123456" icon="i-heroicons-lock-closed" /> | ||
<UInput v-model="state.password" placeholder="Your Password" icon="i-heroicons-lock-closed" /> | ||
</UFormGroup> | ||
<div class="flex justify-end"> | ||
<UButton type="submit" :loading="submiting"> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,8 @@ async function seedUsers() { | |
// TODO: skip exist | ||
await prisma.user.create({ | ||
data: { | ||
username: 'apibeer', | ||
email: '[email protected]', | ||
username: 'apibeer', | ||
password: { | ||
create: { hash: await bcrypt.hash('123456', 10) }, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters