diff --git a/app/Http/Controllers/Api/ImportController.php b/app/Http/Controllers/Api/ImportController.php index 2f88e3f474..682f18d72b 100644 --- a/app/Http/Controllers/Api/ImportController.php +++ b/app/Http/Controllers/Api/ImportController.php @@ -49,10 +49,12 @@ class ImportController extends Controller if (!in_array($file->getMimeType(), array( 'application/vnd.ms-excel', 'text/csv', + 'application/csv', + 'text/x-Algol68', // because wtf CSV files? 'text/plain', 'text/comma-separated-values', 'text/tsv'))) { - $results['error']='File type must be CSV'; + $results['error']='File type must be CSV. Uploaded file is '.$file->getMimeType(); return response()->json(Helper::formatStandardApiResponse('error', null, $results['error']), 500); } diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 8efb0cd834..b8bbf39d4d 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -49,6 +49,7 @@ class UsersController extends Controller 'users.jobtitle', 'users.last_login', 'users.last_name', + 'users.locale', 'users.location_id', 'users.manager_id', 'users.notes', diff --git a/app/Http/Transformers/UsersTransformer.php b/app/Http/Transformers/UsersTransformer.php index 2c01582ddd..f2d1c795fa 100644 --- a/app/Http/Transformers/UsersTransformer.php +++ b/app/Http/Transformers/UsersTransformer.php @@ -27,6 +27,7 @@ class UsersTransformer 'first_name' => e($user->first_name), 'last_name' => e($user->last_name), 'username' => e($user->username), + 'locale' => ($user->locale) ? e($user->locale) : null, 'employee_num' => e($user->employee_num), 'manager' => ($user->manager) ? [ 'id' => (int) $user->manager->id,