url scheme done, switch between apps and orgs mostly done
This commit is contained in:
@@ -12,7 +12,8 @@ export default class Network {
|
||||
id: z.number(),
|
||||
name: z.string(),
|
||||
apps: z.array(z.string()),
|
||||
logo: z.string()
|
||||
logo: z.string(),
|
||||
abbreviation: z.string()
|
||||
})
|
||||
.strict()
|
||||
|
||||
|
||||
@@ -97,9 +97,14 @@ class Server {
|
||||
});
|
||||
return match ? path.join(dir, match) : null;
|
||||
}
|
||||
let filePath = getFileByNumber(path.join(this.DBPath, "images"), path.basename(req.url))
|
||||
|
||||
res.sendFile(filePath)
|
||||
let filePath = path.join(this.DBPath, "images", path.basename(req.url))
|
||||
|
||||
if(filePath) {
|
||||
res.sendFile(filePath)
|
||||
} else {
|
||||
return res.status(404).json({error: "Can't find image"})
|
||||
}
|
||||
}
|
||||
|
||||
get = async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user