mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 07:00:54 +03:00
Begin implementing a reporting mechanism
This commit is contained in:
@@ -3,6 +3,9 @@ const storage = require('../storage');
|
||||
module.exports = async (req, res) => {
|
||||
try {
|
||||
const meta = await storage.metadata(req.params.id);
|
||||
if (!meta || meta.dead) {
|
||||
return res.sendStatus(404);
|
||||
}
|
||||
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
|
||||
res.send({
|
||||
requiresPassword: meta.pwd
|
||||
|
||||
Reference in New Issue
Block a user