File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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} )
You can’t perform that action at this time.
0 commit comments