This commit is contained in:
Robert Hall
2018-09-24 20:49:04 -06:00
parent 46069b2b68
commit 3d2098c250
3 changed files with 9 additions and 10 deletions

View File

@@ -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);

View File

@@ -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>

View File

@@ -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.';