master #50
@@ -2,13 +2,10 @@ import db from '../src/inc/sql.mjs';
 | 
			
		||||
import lib from '../src/inc/lib.mjs';
 | 
			
		||||
 | 
			
		||||
import readline from 'node:readline/promises';
 | 
			
		||||
import stream from 'stream';
 | 
			
		||||
 | 
			
		||||
const _args = process.argv[2];
 | 
			
		||||
 | 
			
		||||
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
 | 
			
		||||
 | 
			
		||||
const newuser = _args?.length ? _args : await rl.question('username: ');
 | 
			
		||||
const newuser = process.argv[2]?.length ? process.argv[2] : await rl.question('username: ');
 | 
			
		||||
const password = await rl.question('password: ');
 | 
			
		||||
const level = +(await rl.question('level (0-100): '));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@ import flummpress from "flummpress";
 | 
			
		||||
    req.session = false;
 | 
			
		||||
    if(req.url.pathname.match(/^\/(s|b|t|ca)\//))
 | 
			
		||||
      return;
 | 
			
		||||
    req.theme = req.cookies.theme ?? 'f0ck';
 | 
			
		||||
    req.theme = req.cookies.theme || 'f0ck';
 | 
			
		||||
 | 
			
		||||
    if(req.cookies.session) {
 | 
			
		||||
      const user = await db`
 | 
			
		||||
@@ -95,6 +95,8 @@ import flummpress from "flummpress";
 | 
			
		||||
        where id = ${+user[0].sess_id}
 | 
			
		||||
      `;
 | 
			
		||||
 | 
			
		||||
      req.session.theme = req.cookies.theme;
 | 
			
		||||
      
 | 
			
		||||
      // update userprofile
 | 
			
		||||
      await db`
 | 
			
		||||
        insert into "user_options" ${
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user