Bugfix 2
This commit is contained in:
		@@ -5,6 +5,8 @@ import { axiosInstance } from '@/main'
 | 
			
		||||
import { router } from '@/router/router'
 | 
			
		||||
import { useUserStore } from '@/stores/user.store'
 | 
			
		||||
import { getActivePinia, storeToRefs } from 'pinia'
 | 
			
		||||
import { useCategoriesStore } from '@/stores/categories.store'
 | 
			
		||||
import { useSiteControlStore } from '@/stores/siteControl.store'
 | 
			
		||||
 | 
			
		||||
const schema = Yup.object().shape({
 | 
			
		||||
  username: Yup.string().required('Nazwa użytkownika jest wymagana'),
 | 
			
		||||
@@ -24,9 +26,10 @@ async function onSubmit(values : any, { setErrors } : any) {
 | 
			
		||||
  });
 | 
			
		||||
  if(body != undefined && body.status == 200) {
 | 
			
		||||
    const userStore = useUserStore();
 | 
			
		||||
    const siteControlStore = useSiteControlStore();
 | 
			
		||||
    const { username } = storeToRefs(userStore);
 | 
			
		||||
    username.value = body.data.displayName;
 | 
			
		||||
    await router.push('/');
 | 
			
		||||
    await siteControlStore.newOrder(true);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user