mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
New design, added category & bug fixes
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import db from "data/icons";
|
||||
|
||||
// 📦 Show categories ->
|
||||
export default function handler(req, res) {
|
||||
try {
|
||||
const categories = db
|
||||
.map((item) => item.category)
|
||||
.filter((category, index, self) => self.indexOf(category) === index);
|
||||
return res.status(200).json(categories);
|
||||
} catch (err) {
|
||||
res.status(400).json({ message: err });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user