mirror of
https://github.com/seejohnrun/haste-server
synced 2025-07-14 00:53:52 -07:00
parent
8add4917d5
commit
44f7ab3f33
2 changed files with 22 additions and 0 deletions
|
@ -83,6 +83,12 @@ var documentHandler = new DocumentHandler({
|
|||
connect.createServer(
|
||||
// First look for api calls
|
||||
connect.router(function(app) {
|
||||
// get raw documents - support getting with extension
|
||||
app.get('/raw/:id', function(request, response, next) {
|
||||
var skipExpire = !!config.documents[request.params.id];
|
||||
var key = request.params.id.split('.')[0];
|
||||
return documentHandler.handleRawGet(key, response, skipExpire);
|
||||
});
|
||||
// add documents
|
||||
app.post('/documents', function(request, response, next) {
|
||||
return documentHandler.handlePost(request, response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue