✨(api) add RELEASE version on config endpoint
Add release version deployed to config endpoint in order to display release info in La Régie footer.
This commit is contained in:
@@ -10,6 +10,7 @@ and this project adheres to
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- ✨(api) add RELEASE version on config endpoint #459
|
||||||
- 🐛(frontend) fix update accesses form #448
|
- 🐛(frontend) fix update accesses form #448
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ class ConfigView(views.APIView):
|
|||||||
GET /api/v1.0/config/
|
GET /api/v1.0/config/
|
||||||
Return a dictionary of public settings.
|
Return a dictionary of public settings.
|
||||||
"""
|
"""
|
||||||
array_settings = ["LANGUAGES", "FEATURES"]
|
array_settings = ["LANGUAGES", "FEATURES", "RELEASE"]
|
||||||
dict_settings = {}
|
dict_settings = {}
|
||||||
for setting in array_settings:
|
for setting in array_settings:
|
||||||
dict_settings[setting] = getattr(settings, setting)
|
dict_settings[setting] = getattr(settings, setting)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ def test_api_config_anonymous():
|
|||||||
assert response.json() == {
|
assert response.json() == {
|
||||||
"LANGUAGES": [["en-us", "English"], ["fr-fr", "French"]],
|
"LANGUAGES": [["en-us", "English"], ["fr-fr", "French"]],
|
||||||
"FEATURES": {"TEAMS": True},
|
"FEATURES": {"TEAMS": True},
|
||||||
|
"RELEASE": "NA",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -36,4 +37,5 @@ def test_api_config_authenticated():
|
|||||||
assert response.json() == {
|
assert response.json() == {
|
||||||
"LANGUAGES": [["en-us", "English"], ["fr-fr", "French"]],
|
"LANGUAGES": [["en-us", "English"], ["fr-fr", "French"]],
|
||||||
"FEATURES": {"TEAMS": True},
|
"FEATURES": {"TEAMS": True},
|
||||||
|
"RELEASE": "NA",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ test.describe('Config', () => {
|
|||||||
['fr-fr', 'French'],
|
['fr-fr', 'French'],
|
||||||
],
|
],
|
||||||
FEATURES: { TEAMS: true },
|
FEATURES: { TEAMS: true },
|
||||||
|
RELEASE: 'NA',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user