Some API tweaks to support a byjove app

This commit is contained in:
Lance Edgar 2022-08-09 14:37:08 -05:00
parent d6aeb1d10f
commit 3edbe96968
2 changed files with 13 additions and 1 deletions

View file

@ -57,6 +57,16 @@ class AuthenticationView(APIView):
data['background_color'] = self.rattail_config.get(
'tailbone', 'background_color')
# TODO: this seems the best place to return some global app
# settings, but maybe not desirable in all cases..in which
# case should caller need to ask for these explicitly? or
# make a different call altogether to get them..?
app = self.get_rattail_app()
customer_handler = app.get_clientele_handler()
data['settings'] = {
'customer_field_dropdown': customer_handler.choice_uses_dropdown(),
}
return data
@api