1
0
James Ketrenos be7b047862 Builds and starting to run
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
2020-04-20 14:15:21 -07:00

49 lines
1.2 KiB
JavaScript
Executable File

"use strict";
const express = require("express"),
config = require("config"),
moment = require("moment"),
crypto = require("crypto"),
util = require("util"),
Promise = require("bluebird");
let gameDB;
require("../db/games").then(function(db) {
gameDB = db;
});
const router = express.Router();
router.post("/", (req, res/*, next*/) => {
console.log("PUT /" + replacements.id, req.query);
return res.status(400).send("Invalid request");
});
/*
return gameDB.sequelize.query("SELECT " +
"photos.*,albums.path AS path,photohashes.hash,modified,(albums.path || photos.filename) AS filepath FROM photos " +
"LEFT JOIN albums ON albums.id=photos.albumId " +
"LEFT JOIN photohashes ON photohashes.photoId=photos.id " +
"WHERE photos.id=:id", {
replacements: {
id: id
},
type: gameDB.Sequelize.QueryTypes.SELECT,
raw: true
}).then(function(photos) {
if (photos.length == 0) {
return null;
}
*/
router.get("/*", (req, res/*, next*/) => {
return gameDB.sequelize.query(query, {
replacements: replacements,
type: gameDB.Sequelize.QueryTypes.SELECT
}).then((photos) => {
});
});
module.exports = router;