mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 09:28:06 +01:00
add moment formatting
This commit is contained in:
parent
faf5e84aeb
commit
542697bcbe
1 changed files with 3 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
along with this program. If not, see https://www.gnu.org/licenses/.
|
along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
*/
|
*/
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const moment = require("moment");
|
||||||
const templateDir = path.resolve(`${process.cwd()}${path.sep}html`);
|
const templateDir = path.resolve(`${process.cwd()}${path.sep}html`);
|
||||||
var express = require("express");
|
var express = require("express");
|
||||||
var app = express();
|
var app = express();
|
||||||
|
@ -83,7 +84,7 @@ app.get("/watch", async function (req, res) {
|
||||||
title: json,
|
title: json,
|
||||||
a:json,
|
a:json,
|
||||||
video: json,
|
video: json,
|
||||||
date: json.uploadDate,
|
date: moment(json.uploadDate).format("LL"),
|
||||||
e:e,
|
e:e,
|
||||||
lyrics: lyrics.replace(/\n/g, " <br> "),
|
lyrics: lyrics.replace(/\n/g, " <br> "),
|
||||||
});
|
});
|
||||||
|
@ -92,7 +93,7 @@ app.get("/", function (req, res) {
|
||||||
renderTemplate(res, req, "ytmain.ejs");
|
renderTemplate(res, req, "ytmain.ejs");
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/youtube/ara", async (req, res) => {
|
app.get("/api/search", async (req, res) => {
|
||||||
const query = req.query.query;
|
const query = req.query.query;
|
||||||
|
|
||||||
if (!query) {
|
if (!query) {
|
||||||
|
|
Loading…
Reference in a new issue