mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Added support for 3625 Angels item icons
This commit is contained in:
1 parent
846853813a
commit
09f476ec40
3629 files changed
+21
No files matched your search
@@ -0,0 +1,16 @@
|
||||
const fs = require("fs-extra")
|
||||
const path = require("path")
|
||||
|
||||
module.exports = function(app){
|
||||
app.get("/api/getPictures", async (req, res) => {
|
||||
let pictures = (await fs.readdir(path.join(__dirname, `../../static/pictures`)))
|
||||
.filter(path => path.includes(".png"))
|
||||
.map(name => ({
|
||||
name: name.replace(".png",""),
|
||||
path: `/pictures/${name}`
|
||||
}))
|
||||
|
||||
|
||||
res.send(pictures)
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user