Completed
Push — master ( 7f683c...28f277 )
by Glenn
45s
created

skf/api/checklist/endpoints/checklist_item.py (1 issue)

Severity
1
2
from flask import request
0 ignored issues
show
Unused request imported from flask
Loading history...
3
from flask_restplus import Resource
4
from skf.api.security import security_headers
5
from skf.api.checklist.business import get_checklist_item
6
from skf.api.checklist.serializers import checklist, message
7
from skf.api.restplus import api
8
9
ns = api.namespace('checklist', description='Operations related to checklist items')
10
11
12
@ns.route('/<float:id>')
13
@api.doc(params={'id': 'The checklist item id'})
14
@api.response(404, 'Validation error', message)
15
class ChecklistItem(Resource):
16
17
    @api.marshal_with(checklist)
18
    @api.response(400, 'No results found', message)
19
    def get(self, id):
20
        """
21
        Returns a checklist item.
22
        * Privileges required: **none**
23
        """
24
        result = get_checklist_item(id)
25
        return result, 200, security_headers()
26