mma-gpacts-app/tasks.js

51 lines
1.1 KiB
JavaScript

// Library of functions used in the app
// ------------------------------------
const {google} = require('googleapis');
var config = require('./config.js');
var auth = require('./auth.js');
var page = require('./page.js');
function not_found(req, res) {
var pg = page.head("Page Not Found");
pg += `<p class="content">404 - Page Not Found</p>`;
pg += page.tail();
res.status(404).send(pg);
}
function home_page(req, res) {
var pg = page.head("Home");
pg += `<p class="content">Welcome Home</p>`;
pg += page.tail();
res.send(pg);
}
function tiny_photos(req, res, api) {
var pg = page.head("Tiny photos");
pg += `<p class="content">These are the tiny photos in your library</p>`;
pg += page.tail();
res.send(pg);
}
function albums(req, res, api) {
var pg = page.head("Albums");
pg += `<p class="content">These are the albums in your library</p>`;
pg += page.tail();
res.send(pg);
}
// Exported functions
module.exports = {
not_found: not_found,
home_page: home_page,
tiny_photos: tiny_photos,
albums: albums
}
// vim: ai ts=4 sts=4 et sw=4 ft=javascript