Skip to content

Commit

Permalink
refactor: useSanctumFetch hook
Browse files Browse the repository at this point in the history
  • Loading branch information
hkp22 committed Aug 28, 2024
1 parent 84e01f6 commit 1eaaff6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions playground/pages/auth/register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ const form = ref({
password_confirmation: '',
});
const sanctumFetch = useSanctumFetch();
async function submit() {
try {
await sanctumFetch('/register', {
await useSanctumFetch('/register', {
method: 'post',
body: form.value,
});
Expand Down
4 changes: 1 addition & 3 deletions playground/pages/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ const form = ref({
const errors = ref<{ [key: string]: string[] }>({});
const sanctumFetch = useSanctumFetch();
async function submit() {
try {
await sanctumFetch('/api/profile', {
await useSanctumFetch('/api/profile', {
method: 'post',
body: form.value,
});
Expand Down

0 comments on commit 1eaaff6

Please sign in to comment.