mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Revert "Revert "add DVLA organisations to API""
This commit is contained in:
committed by
Chris Hill-Scott
parent
4c764dcc80
commit
c4fac1d937
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