2026-03-24 14:25:40 +08:00

16 lines
466 B
TypeScript

import express from "express";
import u from "@/utils";
import { success } from "@/lib/responseFormat";
const router = express.Router();
export default router.post("/", async (req, res) => {
const list = await u.db("o_artStyle").select("*");
const data = await Promise.all(
list.map(async (item: any) => {
const fileUrl = await u.oss.getFileUrl(item.fileUrl);
return { ...item, fileUrl };
}),
);
res.status(200).send(success(data));
});