12345678910111213141516171819 |
- from flask import jsonify
- from flask.views import View
- from pycs.database.Database import Database
- class ListProjects(View):
- """
- get a list of all available projects
- """
- # pylint: disable=arguments-differ
- methods = ['GET']
- def __init__(self, db: Database):
- # pylint: disable=invalid-name
- self.db = db
- def dispatch_request(self):
- return jsonify(self.db.projects())
|