diff options
Diffstat (limited to 'app/assets/javascripts/api/user_api.js')
-rw-r--r-- | app/assets/javascripts/api/user_api.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/api/user_api.js b/app/assets/javascripts/api/user_api.js index 27901120c53..09995fad628 100644 --- a/app/assets/javascripts/api/user_api.js +++ b/app/assets/javascripts/api/user_api.js @@ -1,8 +1,8 @@ -import { deprecatedCreateFlash as flash } from '~/flash'; +import { DEFAULT_PER_PAGE } from '~/api'; +import createFlash from '~/flash'; import { __ } from '~/locale'; import axios from '../lib/utils/axios_utils'; import { buildApiUrl } from './api_utils'; -import { DEFAULT_PER_PAGE } from './constants'; const USER_COUNTS_PATH = '/api/:version/user_counts'; const USERS_PATH = '/api/:version/users.json'; @@ -52,7 +52,11 @@ export function getUserProjects(userId, query, options, callback) { params: { ...defaults, ...options }, }) .then(({ data }) => callback(data)) - .catch(() => flash(__('Something went wrong while fetching projects'))); + .catch(() => + createFlash({ + message: __('Something went wrong while fetching projects'), + }), + ); } export function updateUserStatus({ emoji, message, availability, clearStatusAfter }) { |