fix: inbox using wrong jwt
This commit is contained in:
13 files changed
+5
-33
No files matched your search
@@ -4,8 +4,6 @@ import { getClient } from '$lib/lemmy.js'
|
||||
import { site as siteStore } from '$lib/lemmy'
|
||||
|
||||
export async function load({ fetch }) {
|
||||
if (!profile) return
|
||||
let { jwt } = profile!
|
||||
let site = get(siteStore)
|
||||
|
||||
if (!site) {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { client } from '$lib/lemmy.js'
|
||||
import { redirect } from '@sveltejs/kit'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ params, fetch }) {
|
||||
const comment = await client({
|
||||
|
||||
@@ -11,8 +11,7 @@ import { get } from 'svelte/store'
|
||||
type InboxFeedType = 'replies' | 'mentions' | 'messages' | 'all'
|
||||
|
||||
export async function load({ url, fetch }) {
|
||||
const auth = profile
|
||||
if (!auth?.jwt) return
|
||||
if (!profile.data.jwt) return
|
||||
|
||||
const type: InboxFeedType =
|
||||
(url.searchParams.get('type') as InboxFeedType) || 'all'
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ fetch }) {
|
||||
return (await getClient(undefined, fetch).getFederatedInstances())
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function load({ url, fetch }) {
|
||||
unresolved_only: type == 'unread',
|
||||
}
|
||||
|
||||
const admin = profile.data?.user ? isAdmin(profile!.user!) : false
|
||||
const admin = profile.data?.user ? isAdmin(profile!.data.user!) : false
|
||||
|
||||
const [posts, comments, messages] = await Promise.all([
|
||||
client.listPostReports({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import type {
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
import { browser } from '$app/environment'
|
||||
import { env } from '$env/dynamic/public'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { awaitIfServer } from '$lib/promise.js'
|
||||
import { SSR_ENABLED, settings } from '$lib/settings.svelte'
|
||||
import { error } from '@sveltejs/kit'
|
||||
import type { GetComments } from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ params, url, fetch }) {
|
||||
const thread = url.searchParams.get('thread')
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { client } from '$lib/lemmy.js'
|
||||
import { error } from '@sveltejs/kit'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ fetch, url }) {
|
||||
const { jwt } = profile.data
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { getItemPublished } from '$lib/lemmy/item.js'
|
||||
import type { SortType } from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ url, fetch, parent }) {
|
||||
const page = Number(url.searchParams.get('page')) || 1
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import type {
|
||||
CommentSortType,
|
||||
CommentView,
|
||||
ListingType,
|
||||
PostView,
|
||||
SortType,
|
||||
} from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
import type { CommentView, ListingType, PostView } from 'lemmy-js-client'
|
||||
|
||||
function getSavedItemPublished(item: PostView | CommentView) {
|
||||
if ('comment' in item) {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { getItemPublished } from '$lib/lemmy/item.js'
|
||||
import type { SortType } from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ params, url, fetch }) {
|
||||
const page = Number(url.searchParams.get('page')) || 1
|
||||
|
||||
Reference in new issue
Block a user