mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-12 02:15:17 +00:00
Doh!
This commit is contained in:
@@ -34,7 +34,6 @@ export function authSetup(app) {
|
||||
|
||||
app.post('/auth/signup', async(req, res, next) => {
|
||||
try {
|
||||
debugger
|
||||
const { username, email, password } = req.body;
|
||||
|
||||
const userExists = db.find('username', username);
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<h1>You are now logged in!</h1>
|
||||
|
||||
<figure>
|
||||
{#if $user.username === 'general-zod'}
|
||||
{#if $user.username === 'general-zod'}
|
||||
<figure>
|
||||
<img alt='Zod' src='zod.png'>
|
||||
<figcaption>Kneel before Zod!</figcaption>
|
||||
{:else}
|
||||
</figure>
|
||||
{:else}
|
||||
<figure>
|
||||
<img alt='Super' src='super.png'>
|
||||
<figcaption>Up, up, and away!</figcaption>
|
||||
{/if}
|
||||
</figure>
|
||||
</figure>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
h1, figure, p {
|
||||
h1, figure {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,6 @@ export async function post(req, res) {
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
try {
|
||||
if (req.body.key === 'username') {
|
||||
debugger
|
||||
const found = db.find(req.body.key, req.body.value);
|
||||
if (found) {
|
||||
message = 'That username is already in use.';
|
||||
@@ -18,7 +17,6 @@ export async function post(req, res) {
|
||||
if (!valid) {
|
||||
message = 'Email is invalid.';
|
||||
} else {
|
||||
debugger
|
||||
const found = db.find(req.body.key, req.body.value);
|
||||
if (found) {
|
||||
message = 'Email is already taken.';
|
||||
|
||||
Reference in New Issue
Block a user