Skip to content

Commit

Permalink
Fix : Modify session error
Browse files Browse the repository at this point in the history
- #8
  • Loading branch information
carboxaminoo committed Mar 15, 2024
1 parent 8e5594b commit 3d83291
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.
12 changes: 3 additions & 9 deletions mz_v1_front/src/components/survey/survey.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@
let token = null;
onMount(async () => {
try{
token = sessionStorage.getItem('auth_token');
}
catch(error){
alert(`세션이 만료되었습니다.\n다시 로그인 해주세요.`);
goto('/');
}
});
token = sessionStorage.getItem('auth_token');
const SNS_time =[
{value: 0, label: '1시간 미만'},
Expand Down
8 changes: 1 addition & 7 deletions mz_v1_front/src/routes/home/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
import { goto } from '$app/navigation';
onMount(() => {
try{token = sessionStorage.getItem('auth_token');}
catch(error){
alert(`세션이 만료되었습니다.\n다시 로그인 해주세요.`);
goto('/');
}
});
</script>
<div
style="{'background: var(--neutral-0, #ffffff);padding: 0px 0px 120px 0px; display: flex; flex-direction: column; gap: 180px; align-items: center; justify-content: flex-start; height: 845px; position: relative; ' }"
Expand Down
8 changes: 1 addition & 7 deletions mz_v1_front/src/routes/result/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import SaveImage from "../../components/button/result_save.svelte";
import Survey from "../../components/survey/survey.svelte";
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
let gt_stretch_path_m = "http://223.130.133.236:9000/voice2face-public/site/result/tae_24fps_square.mp4";
let gt_stretch_path_w = "http://223.130.133.236:9000/voice2face-public/site/result/hj_24fps_square.mp4";
Expand All @@ -18,17 +17,12 @@
let token = null;
onMount(async () => {
try{
token = sessionStorage.getItem('auth_token');
gender =sessionStorage.getItem('gender');
id = sessionStorage.getItem('id');
latest_id = sessionStorage.getItem('latest_id');
}
catch(error){
alert(`세션이 만료되었습니다.\n다시 로그인 해주세요.`);
goto('/');
}
const response = await fetch(`https://api.makezenerator.com/api/v1/mz-request/${id}/mz-result/${latest_id}`, {
method: 'GET',
headers: {
Expand Down
8 changes: 0 additions & 8 deletions mz_v1_front/src/routes/resultlist/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
}
onMount(() => {
try{
token = sessionStorage.getItem('auth_token');
}
catch(error){
alert(`세션이 만료되었습니다.\n다시 로그인 해주세요.`);
goto('/');
}
fetchData();
const interval = setInterval(fetchData, 5000);
Expand Down

0 comments on commit 3d83291

Please sign in to comment.