Skip to content
Snippets Groups Projects
Verified Commit 70790117 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

remove unused imports, add a few docstrings

parent eeb2456f
Branches
No related tags found
No related merge requests found
......@@ -2,12 +2,9 @@ from flask import jsonify
from flask_jwt_extended import jwt_required
from flask_cors import cross_origin
from sqlalchemy import func
from config import *
from areas import api_v1
from .apps_service import AppsService
from database import db
from areas import api_v1
CONFIG_DATA = [
{
......@@ -25,6 +22,7 @@ CONFIG_DATA = [
@jwt_required()
@cross_origin()
def get_apps():
"""Return data about all apps"""
apps = AppsService.get_all_apps()
return jsonify(apps)
......@@ -32,6 +30,7 @@ def get_apps():
@api_v1.route('/apps/<string:slug>', methods=['GET'])
@jwt_required()
def get_app(slug):
"""Return data about a single app"""
app = AppsService.get_app(slug)
return jsonify(app)
......@@ -40,20 +39,23 @@ def get_app(slug):
@jwt_required()
@cross_origin()
def post_app():
return jsonify(APPS_DATA), 201
"""Unused function, returns bogus data for now"""
return jsonify([]), 201
@api_v1.route('/apps/<string:slug>', methods=['PUT'])
@jwt_required()
@cross_origin()
def put_app(slug):
return jsonify(APPS_DATA)
"""Unused function, returns bogus data for now"""
return jsonify([])
@api_v1.route('/apps/<string:slug>/config', methods=['GET'])
@jwt_required()
@cross_origin()
def get_config(slug):
"""Returns bogus config data"""
return jsonify(CONFIG_DATA)
......@@ -61,4 +63,5 @@ def get_config(slug):
@jwt_required()
@cross_origin()
def delete_config(slug):
"""Does nothing, then returns bogus config data"""
return jsonify(CONFIG_DATA)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment