FIX: User agent browser detection (#6352)

This commit is contained in:
Bianca Nenciu 2018-08-31 14:49:38 +02:00 committed by Régis Hanol
parent ddfd02ad36
commit 39414068ff

View File

@ -39,7 +39,7 @@ class UserAuthTokenSerializer < ApplicationSerializer
'Linux' 'Linux'
when /Windows/i when /Windows/i
'Windows' 'Windows'
when /macOS/i when /Macintosh|Mac OS X|macOS/i
'macOS' 'macOS'
when /iPhone|iPad|iPod/i when /iPhone|iPad|iPod/i
'iOS' 'iOS'
@ -56,7 +56,7 @@ class UserAuthTokenSerializer < ApplicationSerializer
I18n.t('user_auth_tokens.devices.linux') I18n.t('user_auth_tokens.devices.linux')
when /Windows/i when /Windows/i
I18n.t('user_auth_tokens.devices.windows') I18n.t('user_auth_tokens.devices.windows')
when /macOS/i when /Macintosh|Mac OS X|macOS/i
I18n.t('user_auth_tokens.devices.mac') I18n.t('user_auth_tokens.devices.mac')
when /iPhone/i when /iPhone/i
I18n.t('user_auth_tokens.devices.iphone') I18n.t('user_auth_tokens.devices.iphone')