Completed
Push — master ( 739b7a...711b3d )
by Glenn
01:21
created

skf/api/checklist/endpoints/checklist_items.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_items
6
from skf.api.checklist.serializers import checklist_items, 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('/items')
13
@api.response(404, 'Validation error', message)
14
class ChecklistCollection(Resource):
15
16
    @api.marshal_with(checklist_items)
17
    @api.response(400, 'No results found', message)
18
    def get(self):
19
        """
20
        Returns list of checklist items.
21
        * Privileges required: **none**
22
        """
23
        result = get_checklist_items()
24
        return result, 200, security_headers()
25
26