summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-08-26 09:58:22 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-08-26 10:01:15 +0200
commit4a4bf6debe886d0b5dd078a83b7f2b21569c3177 (patch)
tree78013967f00a0669a74a3001865c1a0d59ba791a
parent4b80f4bfaa21fcdc7c3aab53aeb443e5f3aa0328 (diff)
downloadgitlab-ce-21505-quickactions-update-pd.tar.gz
Add GONE status to httpStatusCodes21505-quickactions-update-pd
-rw-r--r--app/assets/javascripts/lib/utils/http_status.js1
-rw-r--r--app/assets/javascripts/notes/components/noteable_note.vue4
2 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/lib/utils/http_status.js b/app/assets/javascripts/lib/utils/http_status.js
index 37ad1676f7a..5e5d10883a3 100644
--- a/app/assets/javascripts/lib/utils/http_status.js
+++ b/app/assets/javascripts/lib/utils/http_status.js
@@ -19,6 +19,7 @@ const httpStatusCodes = {
UNAUTHORIZED: 401,
FORBIDDEN: 403,
NOT_FOUND: 404,
+ GONE: 410,
UNPROCESSABLE_ENTITY: 422,
};
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue
index 6cd654515ea..9019f0542b6 100644
--- a/app/assets/javascripts/notes/components/noteable_note.vue
+++ b/app/assets/javascripts/notes/components/noteable_note.vue
@@ -14,6 +14,7 @@ import NoteBody from './note_body.vue';
import eventHub from '../event_hub';
import noteable from '../mixins/noteable';
import resolvable from '../mixins/resolvable';
+import httpStatusCodes from '~/lib/utils/http_status';
export default {
name: 'NoteableNote',
@@ -192,8 +193,7 @@ export default {
callback();
})
.catch(response => {
- if (response.status === 410) {
- // gone
+ if (response.status === httpStatusCodes.GONE) {
this.removeNote(this.note);
this.updateSuccess();
callback();