diff --git a/package-lock.json b/package-lock.json index 8a334d1..c7c5d76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "airi", - "version": "1.1.8", + "version": "1.2.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 36c2038..2d1c255 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "airi", - "version": "1.1.8", + "version": "1.2.8", "description": "Random API Serving Anime stuff", "author": "Aeryk", "private": true, diff --git a/src/controllers/gifs/randomAngry.js b/src/controllers/gifs/randomAngry.js new file mode 100644 index 0000000..59d21c0 --- /dev/null +++ b/src/controllers/gifs/randomAngry.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Angry = require('../../models/schemas/Angry') + +// Get random Anime Angry +module.exports = async function getRandomAngry(req, res, next) { + try { + const [result] = await Angry.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Angry Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomBite.js b/src/controllers/gifs/randomBite.js new file mode 100644 index 0000000..105b1c5 --- /dev/null +++ b/src/controllers/gifs/randomBite.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Bite = require('../../models/schemas/Bite') + +// Get random Anime Bite +module.exports = async function getRandomBite(req, res, next) { + try { + const [result] = await Bite.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Bite Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomBlush.js b/src/controllers/gifs/randomBlush.js new file mode 100644 index 0000000..406b855 --- /dev/null +++ b/src/controllers/gifs/randomBlush.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Blush = require('../../models/schemas/Blush') + +// Get random Anime Blush +module.exports = async function getRandomBlush(req, res, next) { + try { + const [result] = await Blush.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Blush Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomBonk.js b/src/controllers/gifs/randomBonk.js new file mode 100644 index 0000000..a1e9258 --- /dev/null +++ b/src/controllers/gifs/randomBonk.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Bonk = require('../../models/schemas/Bonk') + +// Get random Anime Bonk +module.exports = async function getRandomBonk(req, res, next) { + try { + const [result] = await Bonk.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Bonk Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomBored.js b/src/controllers/gifs/randomBored.js new file mode 100644 index 0000000..42510c8 --- /dev/null +++ b/src/controllers/gifs/randomBored.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Bored = require('../../models/schemas/Bored') + +// Get random Anime Bored +module.exports = async function getRandomBored(req, res, next) { + try { + const [result] = await Bored.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Bored Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomBully.js b/src/controllers/gifs/randomBully.js new file mode 100644 index 0000000..148a60f --- /dev/null +++ b/src/controllers/gifs/randomBully.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Bully = require('../../models/schemas/Bully') + +// Get random Anime Bully +module.exports = async function getRandomBully(req, res, next) { + try { + const [result] = await Bully.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Bully Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomBye.js b/src/controllers/gifs/randomBye.js new file mode 100644 index 0000000..a1a9e01 --- /dev/null +++ b/src/controllers/gifs/randomBye.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Bye = require('../../models/schemas/Bye') + +// Get random Anime Bye +module.exports = async function getRandomBye(req, res, next) { + try { + const [result] = await Bye.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Bye Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomChase.js b/src/controllers/gifs/randomChase.js new file mode 100644 index 0000000..96868d8 --- /dev/null +++ b/src/controllers/gifs/randomChase.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Chase = require('../../models/schemas/Chase') + +// Get random Anime Chase +module.exports = async function getRandomChase(req, res, next) { + try { + const [result] = await Chase.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Chase Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomCheer.js b/src/controllers/gifs/randomCheer.js new file mode 100644 index 0000000..3c3f52c --- /dev/null +++ b/src/controllers/gifs/randomCheer.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Cheer = require('../../models/schemas/Cheer') + +// Get random Anime Cheer +module.exports = async function getRandomCheer(req, res, next) { + try { + const [result] = await Cheer.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Cheer Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomCringe.js b/src/controllers/gifs/randomCringe.js new file mode 100644 index 0000000..19e8021 --- /dev/null +++ b/src/controllers/gifs/randomCringe.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Cringe = require('../../models/schemas/Cringe') + +// Get random Anime Cringe +module.exports = async function getRandomCringe(req, res, next) { + try { + const [result] = await Cringe.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Cringe Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomCry.js b/src/controllers/gifs/randomCry.js new file mode 100644 index 0000000..d0b40f3 --- /dev/null +++ b/src/controllers/gifs/randomCry.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Cry = require('../../models/schemas/Cry') + +// Get random Anime Cry +module.exports = async function getRandomCry(req, res, next) { + try { + const [result] = await Cry.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Cry Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomCuddle.js b/src/controllers/gifs/randomCuddle.js new file mode 100644 index 0000000..9f26419 --- /dev/null +++ b/src/controllers/gifs/randomCuddle.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Cuddle = require('../../models/schemas/Cuddle') + +// Get random Anime Cuddle +module.exports = async function getRandomCuddle(req, res, next) { + try { + const [result] = await Cuddle.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Cuddle Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomDab.js b/src/controllers/gifs/randomDab.js new file mode 100644 index 0000000..c5e03b3 --- /dev/null +++ b/src/controllers/gifs/randomDab.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Dab = require('../../models/schemas/Dab') + +// Get random Anime Dab +module.exports = async function getRandomDab(req, res, next) { + try { + const [result] = await Dab.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Dab Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomDance.js b/src/controllers/gifs/randomDance.js new file mode 100644 index 0000000..044d1c4 --- /dev/null +++ b/src/controllers/gifs/randomDance.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Dance = require('../../models/schemas/Dance') + +// Get random Anime Dance +module.exports = async function getRandomDance(req, res, next) { + try { + const [result] = await Dance.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Dance Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomDie.js b/src/controllers/gifs/randomDie.js new file mode 100644 index 0000000..7722cfc --- /dev/null +++ b/src/controllers/gifs/randomDie.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Die = require('../../models/schemas/Die') + +// Get random Anime Die +module.exports = async function getRandomDie(req, res, next) { + try { + const [result] = await Die.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Die Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomDisgust.js b/src/controllers/gifs/randomDisgust.js new file mode 100644 index 0000000..98fdca6 --- /dev/null +++ b/src/controllers/gifs/randomDisgust.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Disgust = require('../../models/schemas/Disgust') + +// Get random Anime Disgust +module.exports = async function getRandomDisgust(req, res, next) { + try { + const [result] = await Disgust.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Disgust Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomFacepalm.js b/src/controllers/gifs/randomFacepalm.js new file mode 100644 index 0000000..a783cd6 --- /dev/null +++ b/src/controllers/gifs/randomFacepalm.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Facepalm = require('../../models/schemas/Facepalm') + +// Get random Anime Facepalm +module.exports = async function getRandomFacepalm(req, res, next) { + try { + const [result] = await Facepalm.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Facepalm Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomFeed.js b/src/controllers/gifs/randomFeed.js new file mode 100644 index 0000000..b6fd55c --- /dev/null +++ b/src/controllers/gifs/randomFeed.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Feed = require('../../models/schemas/Feed') + +// Get random Anime Feed +module.exports = async function getRandomFeed(req, res, next) { + try { + const [result] = await Feed.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Feed Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomGlomp.js b/src/controllers/gifs/randomGlomp.js new file mode 100644 index 0000000..7bc2c1d --- /dev/null +++ b/src/controllers/gifs/randomGlomp.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Glomp = require('../../models/schemas/Glomp') + +// Get random Anime Glomp +module.exports = async function getRandomGlomp(req, res, next) { + try { + const [result] = await Glomp.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Glomp Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomHappy.js b/src/controllers/gifs/randomHappy.js new file mode 100644 index 0000000..0873976 --- /dev/null +++ b/src/controllers/gifs/randomHappy.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Happy = require('../../models/schemas/Happy') + +// Get random Anime Happy +module.exports = async function getRandomHappy(req, res, next) { + try { + const [result] = await Happy.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Happy Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomHi.js b/src/controllers/gifs/randomHi.js new file mode 100644 index 0000000..4e3b353 --- /dev/null +++ b/src/controllers/gifs/randomHi.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Hi = require('../../models/schemas/Hi') + +// Get random Anime Hi +module.exports = async function getRandomHi(req, res, next) { + try { + const [result] = await Hi.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Hi Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomHighfive.js b/src/controllers/gifs/randomHighfive.js new file mode 100644 index 0000000..a3537c1 --- /dev/null +++ b/src/controllers/gifs/randomHighfive.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Highfive = require('../../models/schemas/Highfive') + +// Get random Anime Highfive +module.exports = async function getRandomHighfive(req, res, next) { + try { + const [result] = await Highfive.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Highfive Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomHold.js b/src/controllers/gifs/randomHold.js new file mode 100644 index 0000000..13ec33a --- /dev/null +++ b/src/controllers/gifs/randomHold.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Hold = require('../../models/schemas/Hold') + +// Get random Anime Hold +module.exports = async function getRandomHold(req, res, next) { + try { + const [result] = await Hold.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Hold Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomHug.js b/src/controllers/gifs/randomHug.js new file mode 100644 index 0000000..9ce5ed6 --- /dev/null +++ b/src/controllers/gifs/randomHug.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Hug = require('../../models/schemas/Hug') + +// Get random Anime Hug +module.exports = async function getRandomHug(req, res, next) { + try { + const [result] = await Hug.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Hug Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomKick.js b/src/controllers/gifs/randomKick.js new file mode 100644 index 0000000..4224fe2 --- /dev/null +++ b/src/controllers/gifs/randomKick.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Kick = require('../../models/schemas/Kick') + +// Get random Anime Kick +module.exports = async function getRandomKick(req, res, next) { + try { + const [result] = await Kick.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Kick Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomKill.js b/src/controllers/gifs/randomKill.js new file mode 100644 index 0000000..9b2c772 --- /dev/null +++ b/src/controllers/gifs/randomKill.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Kill = require('../../models/schemas/Kill') + +// Get random Anime Kill +module.exports = async function getRandomKill(req, res, next) { + try { + const [result] = await Kill.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Kill Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomKissu.js b/src/controllers/gifs/randomKissu.js new file mode 100644 index 0000000..0ee5b18 --- /dev/null +++ b/src/controllers/gifs/randomKissu.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Kissu = require('../../models/schemas/Kissu') + +// Get random Anime Kissu +module.exports = async function getRandomKissu(req, res, next) { + try { + const [result] = await Kissu.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Kissu Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomLaugh.js b/src/controllers/gifs/randomLaugh.js new file mode 100644 index 0000000..51b9e2b --- /dev/null +++ b/src/controllers/gifs/randomLaugh.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Laugh = require('../../models/schemas/Laugh') + +// Get random Anime Laugh +module.exports = async function getRandomLaugh(req, res, next) { + try { + const [result] = await Laugh.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Laugh Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomLick.js b/src/controllers/gifs/randomLick.js new file mode 100644 index 0000000..367eb04 --- /dev/null +++ b/src/controllers/gifs/randomLick.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Lick = require('../../models/schemas/Lick') + +// Get random Anime Lick +module.exports = async function getRandomLick(req, res, next) { + try { + const [result] = await Lick.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Lick Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomLove.js b/src/controllers/gifs/randomLove.js new file mode 100644 index 0000000..0749ec9 --- /dev/null +++ b/src/controllers/gifs/randomLove.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Love = require('../../models/schemas/Love') + +// Get random Anime Love +module.exports = async function getRandomLove(req, res, next) { + try { + const [result] = await Love.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Love Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomLurk.js b/src/controllers/gifs/randomLurk.js new file mode 100644 index 0000000..0e2d444 --- /dev/null +++ b/src/controllers/gifs/randomLurk.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Lurk = require('../../models/schemas/Lurk') + +// Get random Anime Lurk +module.exports = async function getRandomLurk(req, res, next) { + try { + const [result] = await Lurk.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Lurk Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomMidfing.js b/src/controllers/gifs/randomMidfing.js new file mode 100644 index 0000000..7d7b1c8 --- /dev/null +++ b/src/controllers/gifs/randomMidfing.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Midfinger = require('../../models/schemas/Midfing') + +// Get random Anime Midfinger +module.exports = async function getRandomMidfinger(req, res, next) { + try { + const [result] = await Midfinger.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Midfinger Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomNervous.js b/src/controllers/gifs/randomNervous.js new file mode 100644 index 0000000..2f834ee --- /dev/null +++ b/src/controllers/gifs/randomNervous.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Nervouse = require('../../models/schemas/Nervouse') + +// Get random Anime Nervous +module.exports = async function getRandomNervous(req, res, next) { + try { + const [result] = await Nervouse.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Nervous Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomNom.js b/src/controllers/gifs/randomNom.js new file mode 100644 index 0000000..effb9d8 --- /dev/null +++ b/src/controllers/gifs/randomNom.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Nom = require('../../models/schemas/Nom') + +// Get random Anime Nom +module.exports = async function getRandomNom(req, res, next) { + try { + const [result] = await Nom.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Nom Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomNope.js b/src/controllers/gifs/randomNope.js new file mode 100644 index 0000000..4bd083a --- /dev/null +++ b/src/controllers/gifs/randomNope.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Nope = require('../../models/schemas/Nope') + +// Get random Anime Nope +module.exports = async function getRandomNope(req, res, next) { + try { + const [result] = await Nope.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Nope Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomNuzzle.js b/src/controllers/gifs/randomNuzzle.js new file mode 100644 index 0000000..a4e01c8 --- /dev/null +++ b/src/controllers/gifs/randomNuzzle.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Nuzzle = require('../../models/schemas/Nuzzle') + +// Get random Anime Nuzzle +module.exports = async function getRandomNuzzle(req, res, next) { + try { + const [result] = await Nuzzle.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Nuzzle Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomPanic.js b/src/controllers/gifs/randomPanic.js new file mode 100644 index 0000000..f4f3ede --- /dev/null +++ b/src/controllers/gifs/randomPanic.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Panic = require('../../models/schemas/Panic') + +// Get random Anime Panic +module.exports = async function getRandomPanic(req, res, next) { + try { + const [result] = await Panic.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Panic Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomPat.js b/src/controllers/gifs/randomPat.js new file mode 100644 index 0000000..64bb4aa --- /dev/null +++ b/src/controllers/gifs/randomPat.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Pat = require('../../models/schemas/Pat') + +// Get random Anime Pat +module.exports = async function getRandomPat(req, res, next) { + try { + const [result] = await Pat.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Pat Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomPeck.js b/src/controllers/gifs/randomPeck.js new file mode 100644 index 0000000..70ff8d7 --- /dev/null +++ b/src/controllers/gifs/randomPeck.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Peck = require('../../models/schemas/Peck') + +// Get random Anime Peck +module.exports = async function getRandomPeck(req, res, next) { + try { + const [result] = await Peck.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Peck Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomPoke.js b/src/controllers/gifs/randomPoke.js new file mode 100644 index 0000000..bc62942 --- /dev/null +++ b/src/controllers/gifs/randomPoke.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Poke = require('../../models/schemas/Poke') + +// Get random Anime Poke +module.exports = async function getRandomPoke(req, res, next) { + try { + const [result] = await Poke.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Poke Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomPout.js b/src/controllers/gifs/randomPout.js new file mode 100644 index 0000000..0632818 --- /dev/null +++ b/src/controllers/gifs/randomPout.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Pout = require('../../models/schemas/Pout') + +// Get random Anime Pout +module.exports = async function getRandomPout(req, res, next) { + try { + const [result] = await Pout.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Pout Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomPunch.js b/src/controllers/gifs/randomPunch.js new file mode 100644 index 0000000..76c1097 --- /dev/null +++ b/src/controllers/gifs/randomPunch.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Punch = require('../../models/schemas/Punch') + +// Get random Anime Punch +module.exports = async function getRandomPunch(req, res, next) { + try { + const [result] = await Punch.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Punch Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomRun.js b/src/controllers/gifs/randomRun.js new file mode 100644 index 0000000..5724ca5 --- /dev/null +++ b/src/controllers/gifs/randomRun.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Run = require('../../models/schemas/Run') + +// Get random Anime Run +module.exports = async function getRandomRun(req, res, next) { + try { + const [result] = await Run.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Run Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSad.js b/src/controllers/gifs/randomSad.js new file mode 100644 index 0000000..19a9d9f --- /dev/null +++ b/src/controllers/gifs/randomSad.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Sad = require('../../models/schemas/Sad') + +// Get random Anime Sad +module.exports = async function getRandomSad(req, res, next) { + try { + const [result] = await Sad.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Sad Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomShoot.js b/src/controllers/gifs/randomShoot.js new file mode 100644 index 0000000..abf8739 --- /dev/null +++ b/src/controllers/gifs/randomShoot.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Shoot = require('../../models/schemas/Shoot') + +// Get random Anime Shoot +module.exports = async function getRandomShoot(req, res, next) { + try { + const [result] = await Shoot.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Shoot Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomShrug.js b/src/controllers/gifs/randomShrug.js new file mode 100644 index 0000000..a1dc472 --- /dev/null +++ b/src/controllers/gifs/randomShrug.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Shrug = require('../../models/schemas/Shrug') + +// Get random Anime Shrug +module.exports = async function getRandomShrug(req, res, next) { + try { + const [result] = await Shrug.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Shrug Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSip.js b/src/controllers/gifs/randomSip.js new file mode 100644 index 0000000..1393955 --- /dev/null +++ b/src/controllers/gifs/randomSip.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Sip = require('../../models/schemas/Sip') + +// Get random Anime Sip +module.exports = async function getRandomSip(req, res, next) { + try { + const [result] = await Sip.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Sip Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSlap.js b/src/controllers/gifs/randomSlap.js new file mode 100644 index 0000000..f9f33c5 --- /dev/null +++ b/src/controllers/gifs/randomSlap.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Slap = require('../../models/schemas/Slap') + +// Get random Anime Slap +module.exports = async function getRandomSlap(req, res, next) { + try { + const [result] = await Slap.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Slap Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSleepy.js b/src/controllers/gifs/randomSleepy.js new file mode 100644 index 0000000..cf7a916 --- /dev/null +++ b/src/controllers/gifs/randomSleepy.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Sleepy = require('../../models/schemas/Sleepy') + +// Get random Anime Sleepy +module.exports = async function getRandomSleepy(req, res, next) { + try { + const [result] = await Sleepy.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Sleepy Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSmile.js b/src/controllers/gifs/randomSmile.js new file mode 100644 index 0000000..cb7e1ed --- /dev/null +++ b/src/controllers/gifs/randomSmile.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Smile = require('../../models/schemas/Smile') + +// Get random Anime Smile +module.exports = async function getRandomSmile(req, res, next) { + try { + const [result] = await Smile.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Smile Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSmug.js b/src/controllers/gifs/randomSmug.js new file mode 100644 index 0000000..51b5512 --- /dev/null +++ b/src/controllers/gifs/randomSmug.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Smug = require('../../models/schemas/Smug') + +// Get random Anime Smug +module.exports = async function getRandomSmug(req, res, next) { + try { + const [result] = await Smug.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Smug Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomStab.js b/src/controllers/gifs/randomStab.js new file mode 100644 index 0000000..9ecfdfc --- /dev/null +++ b/src/controllers/gifs/randomStab.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Stab = require('../../models/schemas/Stab') + +// Get random Anime Stab +module.exports = async function getRandomStab(req, res, next) { + try { + const [result] = await Stab.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Stab Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomStare.js b/src/controllers/gifs/randomStare.js new file mode 100644 index 0000000..8ef72c2 --- /dev/null +++ b/src/controllers/gifs/randomStare.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Stare = require('../../models/schemas/Stare') + +// Get random Anime Stare +module.exports = async function getRandomStare(req, res, next) { + try { + const [result] = await Stare.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Stare Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomSuicide.js b/src/controllers/gifs/randomSuicide.js new file mode 100644 index 0000000..8ffc54d --- /dev/null +++ b/src/controllers/gifs/randomSuicide.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Suicide = require('../../models/schemas/Suicide') + +// Get random Anime Suicide +module.exports = async function getRandomSuicide(req, res, next) { + try { + const [result] = await Suicide.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Suicide Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomTease.js b/src/controllers/gifs/randomTease.js new file mode 100644 index 0000000..76677f1 --- /dev/null +++ b/src/controllers/gifs/randomTease.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Tease = require('../../models/schemas/Tease') + +// Get random Anime Tease +module.exports = async function getRandomTease(req, res, next) { + try { + const [result] = await Tease.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Tease Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomThink.js b/src/controllers/gifs/randomThink.js new file mode 100644 index 0000000..152b937 --- /dev/null +++ b/src/controllers/gifs/randomThink.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Think = require('../../models/schemas/Think') + +// Get random Anime Think +module.exports = async function getRandomThink(req, res, next) { + try { + const [result] = await Think.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Think Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomThumbsup.js b/src/controllers/gifs/randomThumbsup.js new file mode 100644 index 0000000..7ce177e --- /dev/null +++ b/src/controllers/gifs/randomThumbsup.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Thumbsup = require('../../models/schemas/Thumbsup') + +// Get random Anime Thumbsup +module.exports = async function getRandomThumbsup(req, res, next) { + try { + const [result] = await Thumbsup.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Thumbsup Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomTickle.js b/src/controllers/gifs/randomTickle.js new file mode 100644 index 0000000..1fae7d0 --- /dev/null +++ b/src/controllers/gifs/randomTickle.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Tickle = require('../../models/schemas/Tickle') + +// Get random Anime Tickle +module.exports = async function getRandomTickle(req, res, next) { + try { + const [result] = await Tickle.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Tickle Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomTriggered.js b/src/controllers/gifs/randomTriggered.js new file mode 100644 index 0000000..337d502 --- /dev/null +++ b/src/controllers/gifs/randomTriggered.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Triggered = require('../../models/schemas/Triggered') + +// Get random Anime Triggered +module.exports = async function getRandomTriggered(req, res, next) { + try { + const [result] = await Triggered.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Triggered Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomWag.js b/src/controllers/gifs/randomWag.js new file mode 100644 index 0000000..d508349 --- /dev/null +++ b/src/controllers/gifs/randomWag.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Wag = require('../../models/schemas/Wag') + +// Get random Anime Wag +module.exports = async function getRandomWag(req, res, next) { + try { + const [result] = await Wag.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Wag Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomWave.js b/src/controllers/gifs/randomWave.js new file mode 100644 index 0000000..d48eb54 --- /dev/null +++ b/src/controllers/gifs/randomWave.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Wave = require('../../models/schemas/Wave') + +// Get random Anime Wave +module.exports = async function getRandomWave(req, res, next) { + try { + const [result] = await Wave.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Wave Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomWink.js b/src/controllers/gifs/randomWink.js new file mode 100644 index 0000000..b3e5ae3 --- /dev/null +++ b/src/controllers/gifs/randomWink.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Wink = require('../../models/schemas/Wink') + +// Get random Anime Wink +module.exports = async function getRandomWink(req, res, next) { + try { + const [result] = await Wink.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Wink Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/controllers/gifs/randomYes.js b/src/controllers/gifs/randomYes.js new file mode 100644 index 0000000..9f5ccc5 --- /dev/null +++ b/src/controllers/gifs/randomYes.js @@ -0,0 +1,28 @@ +const createError = require('http-errors') +const requestIp = require('request-ip') +const moment = require('moment') +const Yesh = require('../../models/schemas/Yesh') + +// Get random Anime Yesh +module.exports = async function getRandomYes(req, res, next) { + try { + const [result] = await Yesh.aggregate([ + // Select a random document from the results + { $sample: { size: 1 } }, + { $project: { __v: 0, _id: 0 } }, + ]) + + if (!result) { + return next(createError(404, 'Could not find any Yes Gif')) + } + + res.status(200).json(result) + console.log( + `${req.method} | ${moment(Date.now()).format()} ${requestIp.getClientIp( + req + )} to ${req.path} - ${JSON.stringify(req.query)}` + ) + } catch (error) { + return next(error) + } +} diff --git a/src/models/index.js b/src/models/index.js index 4d8d484..48db8d0 100644 --- a/src/models/index.js +++ b/src/models/index.js @@ -3,5 +3,137 @@ const Facts = require('./schemas/Facts') const Users = require('./schemas/Users') const Waifus = require('./schemas/Waifus') const Quotes = require('./schemas/Quotes') +const Sleepy = require('./schemas/Sleepy') +const Smile = require('./schemas/Smile') +const Stab = require('./schemas/Stab') +const Stare = require('./schemas/Stare') +const Suicide = require('./schemas/Suicide') +const Tease = require('./schemas/Tease') +const Wag = require('./schemas/Wag') +const Bite = require('./schemas/Bite') +const Blush = require('./schemas/Blush') +const Bonk = require('./schemas/Bonk') +const Bored = require('./schemas/Bored') +const Bully = require('./schemas/Bully') +const Bye = require('./schemas/Bye') +const Chase = require('./schemas/Chase') +const Cheer = require('./schemas/Cheer') +const Dab = require('./schemas/Dab') +const Die = require('./schemas/Die') +const Disgust = require('./schemas/Disgust') +const Feed = require('./schemas/Feed') +const Hold = require('./schemas/Hold') +const Hi = require('./schemas/Hi') +const Hug = require('./schemas/Hug') +const Kick = require('./schemas/Kick') +const Kill = require('./schemas/Kill') +const Kissu = require('./schemas/Kissu') +const Midfing = require('./schemas/Midfing') +const Nuzzle = require('./schemas/Nuzzle') +const Punch = require('./schemas/Punch') +const Shoot = require('./schemas/Shoot') +const Sip = require('./schemas/Sip') +const Triggered = require('./schemas/Triggered') +const Wave = require('./schemas/Wave') +const Wink = require('./schemas/Wink') +const Yesh = require('./schemas/Yesh') +const Angry = require('./schemas/Angry') +const Cringe = require('./schemas/Cringe') +const Cry = require('./schemas/Cry') +const Cuddle = require('./schemas/Cuddle') +const Dance = require('./schemas/Dance') +const Facepalm = require('./schemas/Facepalm') +const Glomp = require('./schemas/Glomp') +const Happy = require('./schemas/Happy') +const Highfive = require('./schemas/Highfive') +const Laugh = require('./schemas/Laugh') +const Lick = require('./schemas/Lick') +const Love = require('./schemas/Love') +const Lurk = require('./schemas/Lurk') +const Nervouse = require('./schemas/Nervouse') +const Nom = require('./schemas/Nom') +const Nope = require('./schemas/Nope') +const Panic = require('./schemas/Panic') +const Pat = require('./schemas/Pat') +const Peck = require('./schemas/Peck') +const Poke = require('./schemas/Poke') +const Pout = require('./schemas/Pout') +const Run = require('./schemas/Run') +const Sad = require('./schemas/Sad') +const Shrug = require('./schemas/Shrug') +const Slap = require('./schemas/Slap') +const Smug = require('./schemas/Smug') +const Think = require('./schemas/Think') +const Thumbsup = require('./schemas/Thumbsup') +const Tickle = require('./schemas/Tickle') -module.exports = { Tags, Facts, Users, Waifus, Quotes } +module.exports = { + Tags, + Facts, + Users, + Waifus, + Quotes, + Sleepy, + Smile, + Stab, + Stare, + Suicide, + Tease, + Wag, + Bite, + Blush, + Bonk, + Bored, + Bully, + Bye, + Chase, + Cheer, + Dab, + Die, + Disgust, + Feed, + Hold, + Hi, + Hug, + Kick, + Kill, + Kissu, + Midfing, + Nuzzle, + Punch, + Shoot, + Sip, + Triggered, + Wave, + Wink, + Yesh, + Angry, + Cringe, + Cry, + Cuddle, + Dance, + Facepalm, + Glomp, + Happy, + Highfive, + Laugh, + Lick, + Love, + Lurk, + Nervouse, + Nom, + Nope, + Panic, + Pat, + Peck, + Poke, + Pout, + Run, + Sad, + Shrug, + Slap, + Smug, + Think, + Thumbsup, + Tickle, +} diff --git a/src/models/schemas/Angry.js b/src/models/schemas/Angry.js new file mode 100644 index 0000000..e443d3d --- /dev/null +++ b/src/models/schemas/Angry.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const AngrySchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Angry', AngrySchema) diff --git a/src/models/schemas/Bite.js b/src/models/schemas/Bite.js new file mode 100644 index 0000000..5ed7e5c --- /dev/null +++ b/src/models/schemas/Bite.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BiteSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Bite', BiteSchema) diff --git a/src/models/schemas/Blush.js b/src/models/schemas/Blush.js new file mode 100644 index 0000000..e21a406 --- /dev/null +++ b/src/models/schemas/Blush.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BlushSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Blush', BlushSchema) diff --git a/src/models/schemas/Bonk.js b/src/models/schemas/Bonk.js new file mode 100644 index 0000000..071ed4a --- /dev/null +++ b/src/models/schemas/Bonk.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BonkSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Bonk', BonkSchema) diff --git a/src/models/schemas/Bored.js b/src/models/schemas/Bored.js new file mode 100644 index 0000000..6393ba0 --- /dev/null +++ b/src/models/schemas/Bored.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BoredSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Bored', BoredSchema) diff --git a/src/models/schemas/Bully.js b/src/models/schemas/Bully.js new file mode 100644 index 0000000..5c84c31 --- /dev/null +++ b/src/models/schemas/Bully.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BullySchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Bully', BullySchema) diff --git a/src/models/schemas/Bye.js b/src/models/schemas/Bye.js new file mode 100644 index 0000000..e9c316b --- /dev/null +++ b/src/models/schemas/Bye.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const ByeSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Bye', ByeSchema) diff --git a/src/models/schemas/Chase.js b/src/models/schemas/Chase.js new file mode 100644 index 0000000..2d25f31 --- /dev/null +++ b/src/models/schemas/Chase.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const ChaseSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Chase', ChaseSchema) diff --git a/src/models/schemas/Cheer.js b/src/models/schemas/Cheer.js new file mode 100644 index 0000000..df71532 --- /dev/null +++ b/src/models/schemas/Cheer.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const CheerSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Cheer', CheerSchema) diff --git a/src/models/schemas/Cringe.js b/src/models/schemas/Cringe.js new file mode 100644 index 0000000..aa66000 --- /dev/null +++ b/src/models/schemas/Cringe.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const CringeSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Cringe', CringeSchema) diff --git a/src/models/schemas/Cry.js b/src/models/schemas/Cry.js new file mode 100644 index 0000000..bb18960 --- /dev/null +++ b/src/models/schemas/Cry.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const CrySchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Cry', CrySchema) diff --git a/src/models/schemas/Cuddle.js b/src/models/schemas/Cuddle.js new file mode 100644 index 0000000..991d4fd --- /dev/null +++ b/src/models/schemas/Cuddle.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const CuddleSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Cuddle', CuddleSchema) diff --git a/src/models/schemas/Dab.js b/src/models/schemas/Dab.js new file mode 100644 index 0000000..f5ebf33 --- /dev/null +++ b/src/models/schemas/Dab.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const DabSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Dab', DabSchema) diff --git a/src/models/schemas/Dance.js b/src/models/schemas/Dance.js new file mode 100644 index 0000000..cffb36b --- /dev/null +++ b/src/models/schemas/Dance.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const DanceSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Dance', DanceSchema) diff --git a/src/models/schemas/Die.js b/src/models/schemas/Die.js new file mode 100644 index 0000000..148de2e --- /dev/null +++ b/src/models/schemas/Die.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const DieSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Die', DieSchema) diff --git a/src/models/schemas/Disgust.js b/src/models/schemas/Disgust.js new file mode 100644 index 0000000..3a00fa3 --- /dev/null +++ b/src/models/schemas/Disgust.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const DisgustSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Disgust', DisgustSchema) diff --git a/src/models/schemas/Facepalm.js b/src/models/schemas/Facepalm.js new file mode 100644 index 0000000..fd6d178 --- /dev/null +++ b/src/models/schemas/Facepalm.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const FacepalmSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Facepalm', FacepalmSchema) diff --git a/src/models/schemas/Feed.js b/src/models/schemas/Feed.js new file mode 100644 index 0000000..b27b5ae --- /dev/null +++ b/src/models/schemas/Feed.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const FeedSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Feed', FeedSchema) diff --git a/src/models/schemas/Glomp.js b/src/models/schemas/Glomp.js new file mode 100644 index 0000000..6325c5d --- /dev/null +++ b/src/models/schemas/Glomp.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const GlompSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Glomp', GlompSchema) diff --git a/src/models/schemas/Happy.js b/src/models/schemas/Happy.js new file mode 100644 index 0000000..540f1df --- /dev/null +++ b/src/models/schemas/Happy.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const HappySchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Happy', HappySchema) diff --git a/src/models/schemas/Hi.js b/src/models/schemas/Hi.js new file mode 100644 index 0000000..69539e7 --- /dev/null +++ b/src/models/schemas/Hi.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const HiSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Hi', HiSchema) diff --git a/src/models/schemas/Highfive.js b/src/models/schemas/Highfive.js new file mode 100644 index 0000000..7fe5901 --- /dev/null +++ b/src/models/schemas/Highfive.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const HighfiveSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Highfive', HighfiveSchema) diff --git a/src/models/schemas/Hold.js b/src/models/schemas/Hold.js new file mode 100644 index 0000000..859d1bd --- /dev/null +++ b/src/models/schemas/Hold.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const HoldSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Hold', HoldSchema) diff --git a/src/models/schemas/Hug.js b/src/models/schemas/Hug.js new file mode 100644 index 0000000..371098b --- /dev/null +++ b/src/models/schemas/Hug.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const HugSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Hug', HugSchema) diff --git a/src/models/schemas/Kick.js b/src/models/schemas/Kick.js new file mode 100644 index 0000000..40c5666 --- /dev/null +++ b/src/models/schemas/Kick.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const KickSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Kick', KickSchema) diff --git a/src/models/schemas/Kill.js b/src/models/schemas/Kill.js new file mode 100644 index 0000000..9e278c3 --- /dev/null +++ b/src/models/schemas/Kill.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const KillSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Kill', KillSchema) diff --git a/src/models/schemas/Kissu.js b/src/models/schemas/Kissu.js new file mode 100644 index 0000000..e3addba --- /dev/null +++ b/src/models/schemas/Kissu.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const KissuSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Kissu', KissuSchema) diff --git a/src/models/schemas/Laugh.js b/src/models/schemas/Laugh.js new file mode 100644 index 0000000..c9b235b --- /dev/null +++ b/src/models/schemas/Laugh.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const LaughSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Laugh', LaughSchema) diff --git a/src/models/schemas/Lick.js b/src/models/schemas/Lick.js new file mode 100644 index 0000000..b24812d --- /dev/null +++ b/src/models/schemas/Lick.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const LickSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Lick', LickSchema) diff --git a/src/models/schemas/Love.js b/src/models/schemas/Love.js new file mode 100644 index 0000000..5879558 --- /dev/null +++ b/src/models/schemas/Love.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const LoveSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Love', LoveSchema) diff --git a/src/models/schemas/Lurk.js b/src/models/schemas/Lurk.js new file mode 100644 index 0000000..48fa84e --- /dev/null +++ b/src/models/schemas/Lurk.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const LurkSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Lurk', LurkSchema) diff --git a/src/models/schemas/Midfing.js b/src/models/schemas/Midfing.js new file mode 100644 index 0000000..d36ef33 --- /dev/null +++ b/src/models/schemas/Midfing.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const MidfingSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Midfing', MidfingSchema) diff --git a/src/models/schemas/Nervouse.js b/src/models/schemas/Nervouse.js new file mode 100644 index 0000000..2f73061 --- /dev/null +++ b/src/models/schemas/Nervouse.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const NervouseSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Nervouse', NervouseSchema) diff --git a/src/models/schemas/Nom.js b/src/models/schemas/Nom.js new file mode 100644 index 0000000..ae41fe8 --- /dev/null +++ b/src/models/schemas/Nom.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const NomSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Nom', NomSchema) diff --git a/src/models/schemas/Nope.js b/src/models/schemas/Nope.js new file mode 100644 index 0000000..37701f0 --- /dev/null +++ b/src/models/schemas/Nope.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const NopeSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Nope', NopeSchema) diff --git a/src/models/schemas/Nuzzle.js b/src/models/schemas/Nuzzle.js new file mode 100644 index 0000000..0f3f81d --- /dev/null +++ b/src/models/schemas/Nuzzle.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const NuzzleSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Nuzzle', NuzzleSchema) diff --git a/src/models/schemas/Panic.js b/src/models/schemas/Panic.js new file mode 100644 index 0000000..43edf71 --- /dev/null +++ b/src/models/schemas/Panic.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const PanicSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Panic', PanicSchema) diff --git a/src/models/schemas/Pat.js b/src/models/schemas/Pat.js new file mode 100644 index 0000000..7350eb4 --- /dev/null +++ b/src/models/schemas/Pat.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const PatSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Pat', PatSchema) diff --git a/src/models/schemas/Peck.js b/src/models/schemas/Peck.js new file mode 100644 index 0000000..0768bbe --- /dev/null +++ b/src/models/schemas/Peck.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const PeckSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Peck', PeckSchema) diff --git a/src/models/schemas/Poke.js b/src/models/schemas/Poke.js new file mode 100644 index 0000000..ad8f37e --- /dev/null +++ b/src/models/schemas/Poke.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const PokeSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Poke', PokeSchema) diff --git a/src/models/schemas/Pout.js b/src/models/schemas/Pout.js new file mode 100644 index 0000000..07abc12 --- /dev/null +++ b/src/models/schemas/Pout.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const PoutSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Pout', PoutSchema) diff --git a/src/models/schemas/Punch.js b/src/models/schemas/Punch.js new file mode 100644 index 0000000..3c2d129 --- /dev/null +++ b/src/models/schemas/Punch.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const PunchSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Punch', PunchSchema) diff --git a/src/models/schemas/Run.js b/src/models/schemas/Run.js new file mode 100644 index 0000000..c1ef5c9 --- /dev/null +++ b/src/models/schemas/Run.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const RunSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Run', RunSchema) diff --git a/src/models/schemas/Sad.js b/src/models/schemas/Sad.js new file mode 100644 index 0000000..d316f6e --- /dev/null +++ b/src/models/schemas/Sad.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const SadSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Sad', SadSchema) diff --git a/src/models/schemas/Shoot.js b/src/models/schemas/Shoot.js new file mode 100644 index 0000000..438bf90 --- /dev/null +++ b/src/models/schemas/Shoot.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const ShootSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Shoot', ShootSchema) diff --git a/src/models/schemas/Shrug.js b/src/models/schemas/Shrug.js new file mode 100644 index 0000000..95904ca --- /dev/null +++ b/src/models/schemas/Shrug.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const ShrugSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Shrug', ShrugSchema) diff --git a/src/models/schemas/Sip.js b/src/models/schemas/Sip.js new file mode 100644 index 0000000..81b31e3 --- /dev/null +++ b/src/models/schemas/Sip.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const SipSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Sip', SipSchema) diff --git a/src/models/schemas/Slap.js b/src/models/schemas/Slap.js new file mode 100644 index 0000000..24fd688 --- /dev/null +++ b/src/models/schemas/Slap.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const SlapSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Slap', SlapSchema) diff --git a/src/models/schemas/Sleepy.js b/src/models/schemas/Sleepy.js new file mode 100644 index 0000000..b6e73b5 --- /dev/null +++ b/src/models/schemas/Sleepy.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BiteSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Sleepy', BiteSchema) diff --git a/src/models/schemas/Smile.js b/src/models/schemas/Smile.js new file mode 100644 index 0000000..d8e013b --- /dev/null +++ b/src/models/schemas/Smile.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const BiteSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Smile', BiteSchema) diff --git a/src/models/schemas/Smug.js b/src/models/schemas/Smug.js new file mode 100644 index 0000000..dabc129 --- /dev/null +++ b/src/models/schemas/Smug.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const SmugSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Smug', SmugSchema) diff --git a/src/models/schemas/Stab.js b/src/models/schemas/Stab.js new file mode 100644 index 0000000..4761e28 --- /dev/null +++ b/src/models/schemas/Stab.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const StabSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Stab', StabSchema) diff --git a/src/models/schemas/Stare.js b/src/models/schemas/Stare.js new file mode 100644 index 0000000..6ba4960 --- /dev/null +++ b/src/models/schemas/Stare.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const StareSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Stare', StareSchema) diff --git a/src/models/schemas/Suicide.js b/src/models/schemas/Suicide.js new file mode 100644 index 0000000..1dc2daf --- /dev/null +++ b/src/models/schemas/Suicide.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const SuicideSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Suicide', SuicideSchema) diff --git a/src/models/schemas/Tease.js b/src/models/schemas/Tease.js new file mode 100644 index 0000000..db8cd6c --- /dev/null +++ b/src/models/schemas/Tease.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const TeaseSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Tease', TeaseSchema) diff --git a/src/models/schemas/Think.js b/src/models/schemas/Think.js new file mode 100644 index 0000000..2c673f1 --- /dev/null +++ b/src/models/schemas/Think.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const ThinkSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Think', ThinkSchema) diff --git a/src/models/schemas/Thumbsup.js b/src/models/schemas/Thumbsup.js new file mode 100644 index 0000000..cff36eb --- /dev/null +++ b/src/models/schemas/Thumbsup.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const ThumbsupSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Thumbsup', ThumbsupSchema) diff --git a/src/models/schemas/Tickle.js b/src/models/schemas/Tickle.js new file mode 100644 index 0000000..da5981a --- /dev/null +++ b/src/models/schemas/Tickle.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const TickleSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Tickle', TickleSchema) diff --git a/src/models/schemas/Triggered.js b/src/models/schemas/Triggered.js new file mode 100644 index 0000000..5456962 --- /dev/null +++ b/src/models/schemas/Triggered.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const TriggeredSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Triggered', TriggeredSchema) diff --git a/src/models/schemas/Wag.js b/src/models/schemas/Wag.js new file mode 100644 index 0000000..df5577d --- /dev/null +++ b/src/models/schemas/Wag.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const WagSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Wag', WagSchema) diff --git a/src/models/schemas/Wave.js b/src/models/schemas/Wave.js new file mode 100644 index 0000000..72f6929 --- /dev/null +++ b/src/models/schemas/Wave.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const WaveSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Wave', WaveSchema) diff --git a/src/models/schemas/Wink.js b/src/models/schemas/Wink.js new file mode 100644 index 0000000..0146c5e --- /dev/null +++ b/src/models/schemas/Wink.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const WinkSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Wink', WinkSchema) diff --git a/src/models/schemas/Yesh.js b/src/models/schemas/Yesh.js new file mode 100644 index 0000000..93acc51 --- /dev/null +++ b/src/models/schemas/Yesh.js @@ -0,0 +1,8 @@ +const { Schema, model } = require('mongoose') + +const YeshSchema = new Schema({ + _id: { type: Number }, + url: { type: String, required: true }, +}) + +module.exports = model('Yesh', YeshSchema) diff --git a/src/routes.js b/src/routes.js index 7fe0ef9..9ddd3df 100644 --- a/src/routes.js +++ b/src/routes.js @@ -6,6 +6,69 @@ const getAllTags = require('./controllers/tags/listTags') const randomWaifus = require('./controllers/waifus/randomWaifus') const randomPasswords = require('./controllers/passwords/randomPassword') const randomQuotes = require('./controllers/quotes/randomQuotes') +const randomKick = require('./controllers/gifs/randomKick') +const randomKill = require('./controllers/gifs/randomKill') +const randomKissu = require('./controllers/gifs/randomKissu') +const randomMidfing = require('./controllers/gifs/randomMidfing') +const randomNuzzle = require('./controllers/gifs/randomNuzzle') +const randomPunch = require('./controllers/gifs/randomPunch') +const randomShoot = require('./controllers/gifs/randomShoot') +const randomSip = require('./controllers/gifs/randomSip') +const randomSleepy = require('./controllers/gifs/randomSleepy') +const randomSmile = require('./controllers/gifs/randomSmile') +const randomStab = require('./controllers/gifs/randomStab') +const randomStare = require('./controllers/gifs/randomStare') +const randomSuicide = require('./controllers/gifs/randomSuicide') +const randomTease = require('./controllers/gifs/randomTease') +const randomWag = require('./controllers/gifs/randomWag') +const randomBite = require('./controllers/gifs/randomBite') +const randomBlush = require('./controllers/gifs/randomBlush') +const randomBonk = require('./controllers/gifs/randomBonk') +const randomBored = require('./controllers/gifs/randomBored') +const randomBully = require('./controllers/gifs/randomBully') +const randomBye = require('./controllers/gifs/randomBye') +const randomChase = require('./controllers/gifs/randomChase') +const randomCheer = require('./controllers/gifs/randomCheer') +const randomDab = require('./controllers/gifs/randomDab') +const randomDie = require('./controllers/gifs/randomDie') +const randomDisgust = require('./controllers/gifs/randomDisgust') +const randomFeed = require('./controllers/gifs/randomFeed') +const randomHi = require('./controllers/gifs/randomHi') +const randomHold = require('./controllers/gifs/randomHold') +const randomHug = require('./controllers/gifs/randomHug') +const randomNope = require('./controllers/gifs/randomNope') +const randomPanic = require('./controllers/gifs/randomPanic') +const randomPat = require('./controllers/gifs/randomPat') +const randomPeck = require('./controllers/gifs/randomPeck') +const randomPoke = require('./controllers/gifs/randomPoke') +const randomPout = require('./controllers/gifs/randomPout') +const randomRun = require('./controllers/gifs/randomRun') +const randomSad = require('./controllers/gifs/randomSad') +const randomShrug = require('./controllers/gifs/randomShrug') +const randomSlap = require('./controllers/gifs/randomSlap') +const randomSmug = require('./controllers/gifs/randomSmug') +const randomThink = require('./controllers/gifs/randomThink') +const randomThumbsup = require('./controllers/gifs/randomThumbsup') +const randomTickle = require('./controllers/gifs/randomTickle') +const randomTriggered = require('./controllers/gifs/randomTriggered') +const randomWave = require('./controllers/gifs/randomWave') +const randomWink = require('./controllers/gifs/randomWink') +const randomYes = require('./controllers/gifs/randomYes') +const randomAngry = require('./controllers/gifs/randomAngry') +const randomCringe = require('./controllers/gifs/randomCringe') +const randomCry = require('./controllers/gifs/randomCry') +const randomCuddle = require('./controllers/gifs/randomCuddle') +const randomDance = require('./controllers/gifs/randomDance') +const randomFacepalm = require('./controllers/gifs/randomFacepalm') +const randomGlomp = require('./controllers/gifs/randomGlomp') +const randomHappy = require('./controllers/gifs/randomHappy') +const randomHighfive = require('./controllers/gifs/randomHighfive') +const randomLaugh = require('./controllers/gifs/randomLaugh') +const randomLick = require('./controllers/gifs/randomLick') +const randomLove = require('./controllers/gifs/randomLove') +const randomLurk = require('./controllers/gifs/randomLurk') +const randomNervous = require('./controllers/gifs/randomNervous') +const randomNom = require('./controllers/gifs/randomNom') const router = Router() @@ -34,4 +97,71 @@ router.get('/api/password', Limiter, authHandler, randomPasswords) // Random Quote Endpoint router.get('/api/quote', Limiter, authHandler, randomQuotes) +// Random Gifs Endpoints +router.get('/api/kick', Limiter, authHandler, randomKick) +router.get('/api/kill', Limiter, authHandler, randomKill) +router.get('/api/kiss', Limiter, authHandler, randomKissu) +router.get('/api/midfing', Limiter, authHandler, randomMidfing) +router.get('/api/nuzzle', Limiter, authHandler, randomNuzzle) +router.get('/api/punch', Limiter, authHandler, randomPunch) +router.get('/api/shoot', Limiter, authHandler, randomShoot) +router.get('/api/sip', Limiter, authHandler, randomSip) +router.get('/api/sleepy', Limiter, authHandler, randomSleepy) +router.get('/api/smile', Limiter, authHandler, randomSmile) +router.get('/api/stab', Limiter, authHandler, randomStab) +router.get('/api/stare', Limiter, authHandler, randomStare) +router.get('/api/suicide', Limiter, authHandler, randomSuicide) +router.get('/api/tease', Limiter, authHandler, randomTease) +router.get('/api/wag', Limiter, authHandler, randomWag) +router.get('/api/bite', Limiter, authHandler, randomBite) +router.get('/api/blush', Limiter, authHandler, randomBlush) +router.get('/api/bonk', Limiter, authHandler, randomBonk) +router.get('/api/bored', Limiter, authHandler, randomBored) +router.get('/api/bully', Limiter, authHandler, randomBully) +router.get('/api/bye', Limiter, authHandler, randomBye) +router.get('/api/chase', Limiter, authHandler, randomChase) +router.get('/api/cheer', Limiter, authHandler, randomCheer) +router.get('/api/dab', Limiter, authHandler, randomDab) +router.get('/api/die', Limiter, authHandler, randomDie) +router.get('/api/disgust', Limiter, authHandler, randomDisgust) +router.get('/api/feed', Limiter, authHandler, randomFeed) +router.get('/api/hi', Limiter, authHandler, randomHi) +router.get('/api/hold', Limiter, authHandler, randomHold) +router.get('/api/hug', Limiter, authHandler, randomHug) +router.get('/api/Nope', Limiter, authHandler, randomNope) +router.get('/api/panic', Limiter, authHandler, randomPanic) +router.get('/api/pat', Limiter, authHandler, randomPat) +router.get('/api/peck', Limiter, authHandler, randomPeck) +router.get('/api/poke', Limiter, authHandler, randomPoke) +router.get('/api/punch', Limiter, authHandler, randomPunch) +router.get('/api/pout', Limiter, authHandler, randomPout) +router.get('/api/run', Limiter, authHandler, randomRun) +router.get('/api/sad', Limiter, authHandler, randomSad) +router.get('/api/shrug', Limiter, authHandler, randomShrug) +router.get('/api/slap', Limiter, authHandler, randomSlap) +router.get('/api/smug', Limiter, authHandler, randomSmug) +router.get('/api/think', Limiter, authHandler, randomThink) +router.get('/api/thumbsup', Limiter, authHandler, randomThumbsup) +router.get('/api/tickle', Limiter, authHandler, randomTickle) +router.get('/api/triggered', Limiter, authHandler, randomTriggered) +router.get('/api/wave', Limiter, authHandler, randomWave) +router.get('/api/wink', Limiter, authHandler, randomWink) +router.get('/api/yes', Limiter, authHandler, randomYes) +router.get('/api/angry', Limiter, authHandler, randomAngry) +router.get('/api/cringe', Limiter, authHandler, randomCringe) +router.get('/api/cry', Limiter, authHandler, randomCry) +router.get('/api/cuddle', Limiter, authHandler, randomCuddle) +router.get('/api/dance', Limiter, authHandler, randomDance) +router.get('/api/facepalm', Limiter, authHandler, randomFacepalm) +router.get('/api/glomp', Limiter, authHandler, randomGlomp) +router.get('/api/happy', Limiter, authHandler, randomHappy) +router.get('/api/highfive', Limiter, authHandler, randomHighfive) +router.get('/api/hug', Limiter, authHandler, randomHug) +router.get('/api/laugh', Limiter, authHandler, randomLaugh) +router.get('/api/lick', Limiter, authHandler, randomLick) +router.get('/api/love', Limiter, authHandler, randomLove) +router.get('/api/lurk', Limiter, authHandler, randomLurk) +router.get('/api/nervous', Limiter, authHandler, randomNervous) +router.get('/api/nom', Limiter, authHandler, randomNom) + module.exports = router