mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-02 17:48:36 -04:00
add GET /dvla_organisation endpoint
This commit is contained in:
0
app/dvla_organisation/__init__.py
Normal file
0
app/dvla_organisation/__init__.py
Normal file
14
app/dvla_organisation/rest.py
Normal file
14
app/dvla_organisation/rest.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from flask import Blueprint, jsonify
|
||||
|
||||
from app.dao.dvla_organisation_dao import dao_get_dvla_organisations
|
||||
from app.errors import register_errors
|
||||
|
||||
dvla_organisation_blueprint = Blueprint('dvla_organisation', __name__)
|
||||
register_errors(dvla_organisation_blueprint)
|
||||
|
||||
|
||||
@dvla_organisation_blueprint.route('', methods=['GET'])
|
||||
def get_dvla_organisations():
|
||||
return jsonify({
|
||||
org.id: org.name for org in dao_get_dvla_organisations()
|
||||
})
|
||||
Reference in New Issue
Block a user