diff --git a/src/js/apis/c2c/UserProfileService.js b/src/js/apis/c2c/UserProfileService.js index 5b5ab4e246..b32f50cd49 100644 --- a/src/js/apis/c2c/UserProfileService.js +++ b/src/js/apis/c2c/UserProfileService.js @@ -64,11 +64,12 @@ function UserProfileService(api) { }; } -UserProfileService.prototype.login = function (username, password) { +UserProfileService.prototype.login = function (username, password, acceptTos) { return this.api.post('/users/login', { username, password, discourse: true, + accept_tos: acceptTos, }); }; diff --git a/src/js/vue-plugins/user.js b/src/js/vue-plugins/user.js index f3e6d6f1fb..4f1ab8e9fd 100644 --- a/src/js/vue-plugins/user.js +++ b/src/js/vue-plugins/user.js @@ -57,8 +57,8 @@ export default function install(Vue) { }, methods: { - signIn(username, password) { - return c2c.userProfile.login(username, password).then((response) => { + signIn(username, password, acceptTos) { + return c2c.userProfile.login(username, password, acceptTos).then((response) => { this.lang = response.data.lang; this.token = response.data.token; this.roles = response.data.roles; diff --git a/src/views/user/LoginView.vue b/src/views/user/LoginView.vue index cc106fcf1a..b55d9b4aab 100644 --- a/src/views/user/LoginView.vue +++ b/src/views/user/LoginView.vue @@ -23,6 +23,16 @@ icon="key" /> +