summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/sidebar_mediator.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/sidebar/sidebar_mediator.js')
-rw-r--r--app/assets/javascripts/sidebar/sidebar_mediator.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/sidebar/sidebar_mediator.js b/app/assets/javascripts/sidebar/sidebar_mediator.js
index 8ef5bc9db8d..b23788f81fe 100644
--- a/app/assets/javascripts/sidebar/sidebar_mediator.js
+++ b/app/assets/javascripts/sidebar/sidebar_mediator.js
@@ -1,4 +1,5 @@
import Store from 'ee_else_ce/sidebar/stores/sidebar_store';
+import toast from '~/vue_shared/plugins/global_toast';
import { __ } from '~/locale';
import { visitUrl } from '../lib/utils/url_utility';
import { deprecatedCreateFlash as Flash } from '../flash';
@@ -51,6 +52,17 @@ export default class SidebarMediator {
return this.service.update(field, data);
}
+ requestReview({ userId, callback }) {
+ return this.service
+ .requestReview(userId)
+ .then(() => {
+ this.store.updateReviewer(userId);
+ toast(__('Requested review'));
+ callback(true);
+ })
+ .catch(() => callback(false));
+ }
+
setMoveToProjectId(projectId) {
this.store.setMoveToProjectId(projectId);
}