From 8c18c70bd6196c9312b8fd32ea5de41c6ae6f041 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 14 May 2018 17:13:15 +0200 Subject: admin stubb --- bucky/util/adminz.js | 39 +++++++++++++++++++++++++++++++++++++++ fortune/admin-adj | 22 ++++++++++++++++++++++ fortune/admin-noun1 | 14 ++++++++++++++ fortune/admin-noun2 | 12 ++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 bucky/util/adminz.js create mode 100644 fortune/admin-adj create mode 100644 fortune/admin-noun1 create mode 100644 fortune/admin-noun2 diff --git a/bucky/util/adminz.js b/bucky/util/adminz.js new file mode 100644 index 0000000..d972f26 --- /dev/null +++ b/bucky/util/adminz.js @@ -0,0 +1,39 @@ + +var fs = require('fs') +var db = require('../db') +var util = require('./util') +var upload = require('./upload') +var fortune = require('../db/fortune') +var middleware = require('./middleware') + +var adminz = module.exports = { + + init: function(){ + }, + + title: function(){ + return (Math.random() < 0.8 ? [ + fortune('admin-adj'), + fortune('admin-noun1'), + ] : [ + fortune('admin-adj'), + fortune('admin-noun1'), + "and", + fortune('admin-noun2'), + ]).join(" ") + }, + + route: function(app){ + app.get("/adminz", + function(req, res){ + res.render("pages/login", { + title: adminz.title() + }) + }) + app.put("/api/checkin", + middleware.ensureAuthenticated, + auth.checkin + ) + }, + +} diff --git a/fortune/admin-adj b/fortune/admin-adj new file mode 100644 index 0000000..193be6d --- /dev/null +++ b/fortune/admin-adj @@ -0,0 +1,22 @@ +roseate +frosty +brimming +living +red-robed +purple-clad +arboreous +fatuous +over-arching +magnificent +lofty +pale +stained-glass +parapetted +densely-forested +winged +majestic +stupendous +regal +amber-bordered +ambergris +mallow \ No newline at end of file diff --git a/fortune/admin-noun1 b/fortune/admin-noun1 new file mode 100644 index 0000000..731b2ac --- /dev/null +++ b/fortune/admin-noun1 @@ -0,0 +1,14 @@ +fortress +chasm +moat +flask +tower +mint +stag +goat +lion +wheat +palm +arbor +bower +well \ No newline at end of file diff --git a/fortune/admin-noun2 b/fortune/admin-noun2 new file mode 100644 index 0000000..f6ef449 --- /dev/null +++ b/fortune/admin-noun2 @@ -0,0 +1,12 @@ +shield +banner +spear +field +sky +cloud +mountain +hill +heliocanthus +acanthus +river +sceptre \ No newline at end of file -- cgit v1.2.3-70-g09d2