Skip to content

Commit b3929b5

Browse files
authored
Merge pull request #331 from UTDallasEPICS/a2
a2
2 parents 2388c0f + d88d234 commit b3929b5

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

app/pages/auth.vue

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ async function handleSubmit(_event: FormSubmitEvent<any>) {
104104
105105
const result = await $fetch<{
106106
exists: boolean
107-
user: {
108-
id: string
109-
email: string
110-
name: string
111-
role: string
112-
} | null
113107
}>('/api/users/check-email', {
114108
method: 'POST',
115109
body: {
@@ -130,14 +124,6 @@ async function handleSubmit(_event: FormSubmitEvent<any>) {
130124
131125
// Existing user
132126
if (result.exists) {
133-
if (loginRole.value === 'admin' && result.user?.role !== 'admin') {
134-
toast.add({
135-
title: 'Error',
136-
description: 'Admin account not found.',
137-
color: 'error',
138-
})
139-
return
140-
}
141127
142128
const success = await sendMagicLink(callbackURL)
143129

server/api/users/check-email.post.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ export default defineEventHandler(async (event) => {
1616
},
1717
select: {
1818
id: true,
19-
email: true,
20-
name: true,
21-
role: true,
2219
},
2320
})
2421

2522
return {
2623
exists: !!user,
27-
user,
2824
}
2925
})

0 commit comments

Comments
 (0)