Compare commits

..

No commits in common. "0.4.5" and "0.4.4" have entirely different histories.
0.4.5 ... 0.4.4

3 changed files with 6 additions and 15 deletions

View File

@ -2,17 +2,8 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.4.5](https://git.odit.services/lfk/selfservice/compare/0.4.4...0.4.5)
- Merge pull request 'feature/32-registration-language' (#33) from feature/32-registration-language into dev [`#32`](https://git.odit.services/lfk/selfservice/issues/32)
- 🐞 fix /profile/ router on register [`52a0828`](https://git.odit.services/lfk/selfservice/commit/52a082841d47d1ed9c0997776a0784285a3f6ba7)
- pass browser locale to api/runners/register/ [`e3f7497`](https://git.odit.services/lfk/selfservice/commit/e3f7497af5860b2472b6cdfd33090b9d68b9fb49)
#### [0.4.4](https://git.odit.services/lfk/selfservice/compare/0.4.3...0.4.4) #### [0.4.4](https://git.odit.services/lfk/selfservice/compare/0.4.3...0.4.4)
> 31 March 2021
- 🚀Bumped version to v0.4.4 [`9b62962`](https://git.odit.services/lfk/selfservice/commit/9b62962758f8a73d669bca69b77f2c09a13c9e7a)
- 🚑 hotfix - baseurl_selfservice -> baseurl [`84dc33b`](https://git.odit.services/lfk/selfservice/commit/84dc33bf14ace839261aea02ffbcac5d627f8200) - 🚑 hotfix - baseurl_selfservice -> baseurl [`84dc33b`](https://git.odit.services/lfk/selfservice/commit/84dc33bf14ace839261aea02ffbcac5d627f8200)
#### [0.4.3](https://git.odit.services/lfk/selfservice/compare/0.4.2...0.4.3) #### [0.4.3](https://git.odit.services/lfk/selfservice/compare/0.4.2...0.4.3)

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-selfservice", "name": "@odit/lfk-selfservice",
"version": "0.4.5", "version": "0.4.4",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",

View File

@ -261,6 +261,8 @@ import isEmail from 'validator/es/lib/isEmail';
import isMobilePhone from 'validator/es/lib/isMobilePhone'; import isMobilePhone from 'validator/es/lib/isMobilePhone';
import isPostalCode from 'validator/es/lib/isPostalCode'; import isPostalCode from 'validator/es/lib/isPostalCode';
import { useToast } from "vue-toastification"; import { useToast } from "vue-toastification";
// import { router } from '../router';
import { i18n } from '../language';
const props = defineProps({ const props = defineProps({
token: String token: String
@ -318,16 +320,14 @@ function login() {
postdata.team = org_team.value; postdata.team = org_team.value;
} }
toast("registration in progress..."); toast("registration in progress...");
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2); let url = `${config.baseurl}api/runners/register`;
let url = `${config.baseurl}api/runners/register/?locale=${browserlocale}`;
if (props.token) { if (props.token) {
url = `${config.baseurl}api/runners/register/${props.token}/?locale=${browserlocale}` url = `${config.baseurl}api/runners/register/${props.token}`
} }
axios.post(url, postdata) axios.post(url, postdata)
.then(({ data }) => { .then(({ data }) => {
const token = btoa(data.token); const token = btoa(data.token);
// alert(token); // router.push(`${config.baseurl_selfservice}/profile/${token}`);
location.replace(`${config.baseurl_selfservice}profile/${token}`);
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);