Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
implementation #60
Browse files Browse the repository at this point in the history
  • Loading branch information
arafato committed Nov 29, 2017
1 parent b1a0a89 commit f21e10c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/middleware/blob/authentication.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

const BbPromise = require('bluebird'),
azureStorage = require('azure-storage');

module.exports = (req, res, next) => {
BbPromise.try(() => {
const request = req.azuriteRequest;


next();
// Refactor me: Move this to bin/azurite (exception needs to carry res object), and handle entire exception handling there
}).catch((e) => {
res.status(e.statusCode || 500).send(e.message);
if (!e.statusCode) throw e;
});
}

0 comments on commit f21e10c

Please sign in to comment.