Commit 997af68a authored by Peter Hegman's avatar Peter Hegman

Merge branch '340189-fix-error-message-color' into 'master'

Fix: display alert when response status is error

See merge request gitlab-org/gitlab!81052
parents af58aeb4 cf6420d4
import $ from 'jquery';
import createFlash from '~/flash';
import createFlash, { FLASH_TYPES } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { parseBoolean } from '~/lib/utils/common_utils';
import { Rails } from '~/lib/utils/rails_ujs';
......@@ -86,7 +86,7 @@ export default class Profile {
createFlash({
message: data.message,
type: 'notice',
type: data.status === 'error' ? FLASH_TYPES.ALERT : FLASH_TYPES.NOTICE,
});
})
.then(() => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment