ebagabee пре 1 месец
родитељ
комит
bb0018899c
2 измењених фајлова са 3 додато и 0 уклоњено
  1. 1 0
      src/composables/useAuth.js
  2. 2 0
      src/pages/login/LoginPage.vue

+ 1 - 0
src/composables/useAuth.js

@@ -15,6 +15,7 @@ export const useAuth = () => {
       const response = await api.post("/login", {
         email: email,
         password: password,
+        origem: 'admin'
       });
 
       if (response.status === 200) {

+ 2 - 0
src/pages/login/LoginPage.vue

@@ -122,10 +122,12 @@ const checkbox = ref(false);
 
 const onSubmit = async () => {
   await submitForm(() => login(form.value.email, form.value.password));
+
   const email_storage = $q.cookies.get("email");
   if (email_storage && !checkbox.value) {
     $q.cookies.remove("email");
   }
+
   if (checkbox.value) {
     $q.cookies.set("email", form.value.email, {
       path: "/",