Added Types
Corrected Return
This commit is contained in:
@@ -80,6 +80,8 @@ export default async function emailAsUserRoutes(server: FastifyInstance) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return returnData;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const { data, error } = await server.supabase
|
const { data, error } = await server.supabase
|
||||||
@@ -105,19 +107,8 @@ export default async function emailAsUserRoutes(server: FastifyInstance) {
|
|||||||
|
|
||||||
return accounts
|
return accounts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return returnData;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
server.post("/email/send", async (req, reply) => {
|
server.post("/email/send", async (req, reply) => {
|
||||||
const body = req.body as {
|
const body = req.body as {
|
||||||
to: string
|
to: string
|
||||||
@@ -132,7 +123,13 @@ export default async function emailAsUserRoutes(server: FastifyInstance) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
let accountData = {}
|
let accountData = {} as {
|
||||||
|
email: string
|
||||||
|
password: string
|
||||||
|
smtp_host: string
|
||||||
|
smtp_port: number
|
||||||
|
smtp_ssl: boolean
|
||||||
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const { data, error } = await server.supabase
|
const { data, error } = await server.supabase
|
||||||
.from("user_credentials")
|
.from("user_credentials")
|
||||||
|
|||||||
Reference in New Issue
Block a user