diff --git a/src/js/apis/c2c/UserProfileService.js b/src/js/apis/c2c/UserProfileService.js index 7c1077ac0..06d49533c 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 6b6f1de9c..b6486c570 100644 --- a/src/js/vue-plugins/user.js +++ b/src/js/vue-plugins/user.js @@ -72,8 +72,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 aae0176c7..da182d34f 100644 --- a/src/views/user/LoginView.vue +++ b/src/views/user/LoginView.vue @@ -23,6 +23,17 @@ icon="key" /> +