theme
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createClient, type BufferLike } from "webdav";
|
||||
import { createClient } from "webdav";
|
||||
import fs from "fs/promises";
|
||||
import path from "path";
|
||||
|
||||
|
||||
@@ -4,13 +4,9 @@ import type { Request, Response, NextFunction } from "express";
|
||||
export function authMiddleware(req: Request, res: Response, next: NextFunction) {
|
||||
try {
|
||||
const token = req.cookies.token;
|
||||
|
||||
if (!token) { return res.sendStatus(401); }
|
||||
|
||||
console.log("Token: ", token)
|
||||
console.log("Secret: ", process.env.JWT_SECRET)
|
||||
jwt.verify(token, process.env.JWT_SECRET!)
|
||||
|
||||
next();
|
||||
|
||||
} catch {
|
||||
|
||||
@@ -25,10 +25,10 @@ router.get("/video", async (req, res) => {
|
||||
|
||||
router.post("/createclip", async (req, res) => {
|
||||
try {
|
||||
encodeFrames({
|
||||
await encodeFrames({
|
||||
inputPattern: `${LOCAL_DIR}/*.jpg`,
|
||||
output: path.resolve("./out.mp4"),
|
||||
fps: 12,
|
||||
fps: 8,
|
||||
});
|
||||
res.status(200).end();
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user