mirror of
https://github.com/System-End/site.git
synced 2026-04-20 00:25:19 +00:00
This might work
This commit is contained in:
parent
076f9adef4
commit
ef7d5049a6
2 changed files with 7 additions and 2 deletions
|
|
@ -63,7 +63,10 @@ export default function Signup() {
|
|||
const handleSubmit = async e => {
|
||||
e.preventDefault()
|
||||
|
||||
setSubmitted(true)
|
||||
fetch('/api/bank/demo', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(values)
|
||||
})
|
||||
|
||||
// clear form
|
||||
setValues({
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@ export default async function handler(req, res) {
|
|||
Status: 'Demo Account',
|
||||
'HCB account URL': `https://bank.hackclub.com/${r.slug}`
|
||||
})
|
||||
res.send('Success! Check your email for next steps.').end()
|
||||
res
|
||||
.status(200)
|
||||
.json({ message: 'Success! Check your email for next steps.' })
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue