mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
**Maybe** fix the sources system & fix logout system.
This commit is contained in:
parent
bf4e695676
commit
200e89f066
@ -11,8 +11,8 @@ const props = defineProps<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const openNewWindow = (itemId: string) => {
|
const openNewWindow = (itemId: string) => {
|
||||||
emit("windowopener", "aboutNewsOrg");
|
|
||||||
emit("loadValue", itemId);
|
emit("loadValue", itemId);
|
||||||
|
emit("windowopener", "aboutNewsOrg");
|
||||||
};
|
};
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -78,9 +78,9 @@ onMounted(async () => {
|
|||||||
{{ errorMsg }}
|
{{ errorMsg }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row flexw-wrap justify-center gap-2">
|
<div class="flex flex-row flex-wrap justify-center gap-2">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col group bg-gray-900/30 rounded-xl p-3 transition-all duration-500 shadow-lg hover:translate-y-[-2px] ransition-all duration-700"
|
class="flex flex-col group bg-gray-900/30 rounded-xl p-3 transition-all shadow-lg hover:translate-y-[-2px] ransition-all duration-500 max-w-1/2"
|
||||||
v-for="item in source?.data"
|
v-for="item in source?.data"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
>
|
>
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
import getUserTokenMinusSQLInjection from "~/server/components/getUserToken";
|
import getUserTokenMinusSQLInjection from "~/server/components/getUserToken";
|
||||||
|
|
||||||
export default defineEventHandler(async (event) => {
|
export default defineEventHandler(async (event) => {
|
||||||
const loginCookie = await getUserTokenMinusSQLInjection(event);
|
const userToken = await getUserTokenMinusSQLInjection(event);
|
||||||
|
if (userToken.error.length !== 0) {
|
||||||
|
return {
|
||||||
|
error: userToken.error,
|
||||||
|
};
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if (false) {
|
deleteCookie(event, "token");
|
||||||
deleteCookie(event, "token");
|
return {
|
||||||
return {
|
success: true,
|
||||||
success: true,
|
error: null,
|
||||||
error: null,
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
return "testing";
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user