Skip to content

Commit

Permalink
Fix: movie push
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Oct 31, 2023
1 parent 27fccce commit 5abf1b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/MoviePush.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ import type { BaseMovieInfo } from "@/proto/message";
import { strLengthLimit } from "@/utils/utils";
import { pushMovieApi } from "@/services/apis/movie";
import customHeaders from "@/components/dialogs/customHeaders.vue";
import { useRouteParams } from "@vueuse/router";
const Emits = defineEmits(["getMovies"]);
const customHeadersDialog = ref<InstanceType<typeof customHeaders>>();
// 获取房间信息
const roomID = useRouteParams("roomId");
const roomToken = localStorage.getItem(`room-${roomID.value}-token`) ?? "";
// 新影片信息
let newMovieInfo = ref<BaseMovieInfo>({
name: "",
Expand Down Expand Up @@ -176,7 +181,7 @@ const pushMovie = async (dir: string) => {
pos: dir
},
data: newMovieInfo.value,
headers: { Authorization: localStorage.token }
headers: { Authorization: roomToken }
});
ElNotification({
Expand Down

0 comments on commit 5abf1b6

Please sign in to comment.