Skip to content

Commit

Permalink
Added status view
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Jul 11, 2016
1 parent 04ee1b6 commit 0ddfede
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions openprocurement/documentservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def main(global_config, **settings):
)
config.add_subscriber(add_logging_context, ContextFound)
config.include('pyramid_exclog')
config.add_route('status', '/')
config.add_route('register', '/register')
config.add_route('upload', '/upload')
config.add_route('upload_file', '/upload/{doc_id}')
Expand Down
6 changes: 6 additions & 0 deletions openprocurement/documentservice/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
EXPIRES = 300


@view_config(route_name='status', renderer='json')
def status_view(request):
request.response.status = 204
request.response.content_type = ''


@view_config(route_name='register', renderer='json', request_method='POST', permission='upload')
def register_view(request):
if 'hash' not in request.POST:
Expand Down

0 comments on commit 0ddfede

Please sign in to comment.