Skip to content

Commit

Permalink
Merge pull request #31 from tsaxking/chore-update-scripts-to-2e651283…
Browse files Browse the repository at this point in the history
…2cdf06ff4e1036abfff500a360c24b78

Chore update scripts to 2e65128
  • Loading branch information
tsaxking authored Jan 28, 2024
2 parents 5fb28be + 09070a5 commit d25cfe0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/tests/all-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const runTests = async () => {

const pass = () => assertEquals(true, true);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const invalid: [string, any][] = [];
const missing: string[] = [];

Expand Down
6 changes: 4 additions & 2 deletions server/routes/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ router.post('/get-roles', (req, res) => {
res.json(Role.all());
});

router.get('/sign-in', (_req, res) => {
router.get('/sign-in', (req, res, next) => {
if (req.session.account) return next();
res.sendTemplate('entries/account/sign-in');
});

router.get('/sign-up', (_req, res) => {
router.get('/sign-up', (req, res, next) => {
if (req.session.account) return next();
res.sendTemplate('entries/account/sign-up');
});

Expand Down
4 changes: 4 additions & 0 deletions server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import env, { __root, resolve } from './utilities/env.ts';
import { log, error } from './utilities/terminal-logging.ts';
import { App, ResponseStatus } from './structure/app/app.ts';
import { Session } from './structure/sessions.ts';
import { getJSON, log as serverLog } from './utilities/files.ts';

Check warning on line 5 in server/server.ts

View workflow job for this annotation

GitHub Actions / test

'getJSON' is defined but never used. Allowed unused vars must match /^_/u
import { homeBuilder } from './utilities/page-builder.ts';

Check warning on line 6 in server/server.ts

View workflow job for this annotation

GitHub Actions / test

'homeBuilder' is defined but never used. Allowed unused vars must match /^_/u
import Account from './structure/accounts.ts';

Check warning on line 7 in server/server.ts

View workflow job for this annotation

GitHub Actions / test

'Account' is defined but never used. Allowed unused vars must match /^_/u
import { log as serverLog } from './utilities/files.ts';
import { runBuild } from './bundler.ts';
import { router as api } from './routes/api.ts';
import Role from './structure/roles.ts';

Check warning on line 11 in server/server.ts

View workflow job for this annotation

GitHub Actions / test

'Role' is defined but never used. Allowed unused vars must match /^_/u
import { FileUpload } from './middleware/stream.ts';
import { stdin } from './utilities/utilties.ts';
import { ReqBody } from './structure/app/req.ts';
Expand Down
2 changes: 1 addition & 1 deletion server/utilities/env.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os from 'https://deno.land/x/[email protected]/mod.ts';
import * as blog from 'https://deno.land/x/[email protected]/deps.ts';
import path from 'node:path';
import { error, log } from './terminal-logging.ts';
import { error } from './terminal-logging.ts';

/**
* Makes paths consistent across platforms
Expand Down
2 changes: 2 additions & 0 deletions shared/status-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ export const messages: {
color: 'success',
code: 200,
instructions: 'You will be redirected to the home page.',
redirect: '/home',
},
'account:logged-out': {
message: 'You have been logged out.',
color: 'success',
code: 200,
instructions: 'You will be redirected to the home page.',
redirect: '/home',
},
'account:no-role': {
message: 'This account does not have this role',
Expand Down

0 comments on commit d25cfe0

Please sign in to comment.