change archive and unarchive to post's

This commit is contained in:
Henry Oswald 2015-10-01 15:55:07 +01:00
parent 6052bf6a7e
commit ef69729dfd
2 changed files with 4 additions and 4 deletions

View file

@ -27,8 +27,8 @@ app.post "/project/:project_id/doc/:doc_id/version/:version/restore", HttpContro
app.post "/doc/:doc_id/pack", HttpController.packDoc
app.get '/project/:project_id/archive', HttpController.archiveProject
app.get '/project/:project_id/unarchive', HttpController.unArchiveProject
app.post '/project/:project_id/archive', HttpController.archiveProject
app.post '/project/:project_id/unarchive', HttpController.unArchiveProject
packWorker = null # use a single packing worker

View file

@ -75,14 +75,14 @@ module.exports = TrackChangesClient =
callback null
archiveProject: (project_id, callback = (error) ->) ->
request.get {
request.post {
url: "http://localhost:3015/project/#{project_id}/archive"
}, (error, response, body) =>
response.statusCode.should.equal 204
callback(error)
unarchiveProject: (project_id, callback = (error) ->) ->
request.get {
request.post {
url: "http://localhost:3015/project/#{project_id}/unarchive"
}, (error, response, body) =>
response.statusCode.should.equal 204