style: auto format

This commit is contained in:
github-actions[bot] 2026-04-14 00:39:34 +00:00
parent cef5c68b9c
commit 7cb1e37da9
6 changed files with 355 additions and 353 deletions

View File

@ -135,91 +135,93 @@ async function handler(ctx) {
} = await ofetch(graphqlUrl, {
method: 'POST',
body: {
query: /* GraphQL */ `query CommunityQuery($id: ID, $slug: String) {
community(where: { _id_EQ: $id, slug_EQ: $slug }) {
...CommunityFragment
topContributors {
account {
_id
avatarUrl
avatarImage {
...ImageFragment
}
username
}
score
}
topGemFinders {
account {
_id
avatarUrl
avatarImage {
...ImageFragment
}
username
}
score
}
}
}
fragment AuthorFragment on Account {
_id
username
avatarUrl
avatarImage {
...ImageFragment
}
badges {
name
iconUrl
}
blockStatus
roles {
name
iconUrl
}
}
fragment CommunityFragment on Community {
_id
name
slug
description
iconUrl
guidelinesPM
descriptionPM
iconImage {
...ImageFragment
}
bannerUrl
bannerDesktopImage {
...ImageFragment
}
bannerMobileImage {
...ImageFragment
}
founder {
...AuthorFragment
bio
}
manager {
...AuthorFragment
}
memberCount
postCount
isJoinedByAccount
isPinnedByAccount
isJoinedByDefault
createdDate
editedDate
deletedDate
}
fragment ImageFragment on Image {
alt
height
width
url
blurhash
}`,
query: /* GraphQL */ `
query CommunityQuery($id: ID, $slug: String) {
community(where: { _id_EQ: $id, slug_EQ: $slug }) {
...CommunityFragment
topContributors {
account {
_id
avatarUrl
avatarImage {
...ImageFragment
}
username
}
score
}
topGemFinders {
account {
_id
avatarUrl
avatarImage {
...ImageFragment
}
username
}
score
}
}
}
fragment AuthorFragment on Account {
_id
username
avatarUrl
avatarImage {
...ImageFragment
}
badges {
name
iconUrl
}
blockStatus
roles {
name
iconUrl
}
}
fragment CommunityFragment on Community {
_id
name
slug
description
iconUrl
guidelinesPM
descriptionPM
iconImage {
...ImageFragment
}
bannerUrl
bannerDesktopImage {
...ImageFragment
}
bannerMobileImage {
...ImageFragment
}
founder {
...AuthorFragment
bio
}
manager {
...AuthorFragment
}
memberCount
postCount
isJoinedByAccount
isPinnedByAccount
isJoinedByDefault
createdDate
editedDate
deletedDate
}
fragment ImageFragment on Image {
alt
height
width
url
blurhash
}
`,
variables: { slug: community },
},
});
@ -232,148 +234,145 @@ fragment ImageFragment on Image {
} = await ofetch(graphqlUrl, {
method: 'POST',
body: {
query: /* GraphQL */ `query PostsQuery(
$first: Int
$after: String
$where: PostWhere
$sort: PostSort
) {
posts(first: $first, after: $after, where: $where, sort: $sort) {
edges {
node {
...PostsNodeFragment
}
}
pageInfo {
...PageInfoFragment
}
}
}
fragment AuthorFragment on Account {
_id
username
avatarUrl
avatarImage {
...ImageFragment
}
badges {
name
iconUrl
}
blockStatus
roles {
name
iconUrl
}
}
fragment CommunityFragment on Community {
_id
name
slug
description
iconUrl
guidelinesPM
descriptionPM
iconImage {
...ImageFragment
}
bannerUrl
bannerDesktopImage {
...ImageFragment
}
bannerMobileImage {
...ImageFragment
}
founder {
...AuthorFragment
bio
}
manager {
...AuthorFragment
}
memberCount
postCount
isJoinedByAccount
isPinnedByAccount
isJoinedByDefault
createdDate
editedDate
deletedDate
}
fragment ImageFragment on Image {
alt
height
width
url
blurhash
}
fragment ModerationReasonFragment on ModerationRemovalReason {
id
key
description
message
type
createdDate
editedDate
deletedDate
}
fragment PageInfoFragment on PageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
fragment PostsNodeFragment on Post {
_id
title
isSavedByAccount
moderationStatus
isDuggByAccount
voteDirectionByAccount
upvoteCount
downvoteCount
score
reportByAccount
slug
type
externalContent {
url
headline
subHeadline
imageUrl
iconUrl
}
commentCount
shareCount
textPreview
contextCards {
tldr {
text
}
}
community {
...CommunityFragment
}
attachments {
__typename
... on Image {
...ImageFragment
}
}
author {
...AuthorFragment
}
createdDate
editedDate
deletedDate
nsfw
text
pm
moderatedDate
moderationReason {
...ModerationReasonFragment
}
}`,
query: /* GraphQL */ `
query PostsQuery($first: Int, $after: String, $where: PostWhere, $sort: PostSort) {
posts(first: $first, after: $after, where: $where, sort: $sort) {
edges {
node {
...PostsNodeFragment
}
}
pageInfo {
...PageInfoFragment
}
}
}
fragment AuthorFragment on Account {
_id
username
avatarUrl
avatarImage {
...ImageFragment
}
badges {
name
iconUrl
}
blockStatus
roles {
name
iconUrl
}
}
fragment CommunityFragment on Community {
_id
name
slug
description
iconUrl
guidelinesPM
descriptionPM
iconImage {
...ImageFragment
}
bannerUrl
bannerDesktopImage {
...ImageFragment
}
bannerMobileImage {
...ImageFragment
}
founder {
...AuthorFragment
bio
}
manager {
...AuthorFragment
}
memberCount
postCount
isJoinedByAccount
isPinnedByAccount
isJoinedByDefault
createdDate
editedDate
deletedDate
}
fragment ImageFragment on Image {
alt
height
width
url
blurhash
}
fragment ModerationReasonFragment on ModerationRemovalReason {
id
key
description
message
type
createdDate
editedDate
deletedDate
}
fragment PageInfoFragment on PageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
fragment PostsNodeFragment on Post {
_id
title
isSavedByAccount
moderationStatus
isDuggByAccount
voteDirectionByAccount
upvoteCount
downvoteCount
score
reportByAccount
slug
type
externalContent {
url
headline
subHeadline
imageUrl
iconUrl
}
commentCount
shareCount
textPreview
contextCards {
tldr {
text
}
}
community {
...CommunityFragment
}
attachments {
__typename
... on Image {
...ImageFragment
}
}
author {
...AuthorFragment
}
createdDate
editedDate
deletedDate
nsfw
text
pm
moderatedDate
moderationReason {
...ModerationReasonFragment
}
}
`,
variables: { first: limit, where: { community: { slug_EQ: community } }, sort: 'RECENT' },
},
});

View File

@ -58,7 +58,6 @@ async function handler() {
}
}
}
`,
},
});

View File

@ -85,7 +85,6 @@ async function handler(ctx) {
}
}
}
`,
},
});

View File

@ -39,48 +39,49 @@ async function handler(ctx) {
},
},
query: /* GraphQL */ `
fragment section on Section {
id
name
slug
state
__typename
}
fragment section on Section {
id
name
slug
state
__typename
}
fragment category on Category {
id
name
slug
state
__typename
}
fragment category on Category {
id
name
slug
state
__typename
}
fragment listingPost on Post {
id
slug
title
brief
publishedDate
state
sections(where: {state: {equals: "active"}}) {
...section
__typename
}
categories(where: {state: {equals: "active"}}) {
...category
__typename
}
isFeatured
__typename
}
fragment listingPost on Post {
id
slug
title
brief
publishedDate
state
sections(where: { state: { equals: "active" } }) {
...section
__typename
}
categories(where: { state: { equals: "active" } }) {
...category
__typename
}
isFeatured
__typename
}
query ($take: Int, $skip: Int, $orderBy: [PostOrderByInput!]!, $filter: PostWhereInput!) {
postsCount(where: $filter)
posts(take: $take, skip: $skip, orderBy: $orderBy, where: $filter) {
...listingPost
__typename
}
}`,
query ($take: Int, $skip: Int, $orderBy: [PostOrderByInput!]!, $filter: PostWhereInput!) {
postsCount(where: $filter)
posts(take: $take, skip: $skip, orderBy: $orderBy, where: $filter) {
...listingPost
__typename
}
}
`,
},
});

View File

@ -57,50 +57,51 @@ async function handler(ctx) {
body: {
operationName: 'ArtistDetailLoadUser',
query: /* GraphQL */ `
query ArtistDetailLoadUser($artistUrl: String!) {
user(artistUrl: $artistUrl) {
coverUrl
coverImageMeta {
isDark
isLight
startRgba: rgba(opacity: 1)
endRgba: rgba(opacity: 0.24)
}
createdAt
instruments
userId
name
profileUrl
iamUuid
artistUrl
profileImageMeta {
startRgba: rgba(opacity: 1)
endRgba: rgba(opacity: 0.24)
hex
isDark
}
social {
type
url
}
sheetsCount
isArtist
isOfficial
likes
seoInfo {
title
description
keywords
imageUrl
}
uploadedInstrumentGroups {
name
instruments {
name
query ArtistDetailLoadUser($artistUrl: String!) {
user(artistUrl: $artistUrl) {
coverUrl
coverImageMeta {
isDark
isLight
startRgba: rgba(opacity: 1)
endRgba: rgba(opacity: 0.24)
}
createdAt
instruments
userId
name
profileUrl
iamUuid
artistUrl
profileImageMeta {
startRgba: rgba(opacity: 1)
endRgba: rgba(opacity: 0.24)
hex
isDark
}
social {
type
url
}
sheetsCount
isArtist
isOfficial
likes
seoInfo {
title
description
keywords
imageUrl
}
uploadedInstrumentGroups {
name
instruments {
name
}
}
}
}
}
}
}`,
`,
variables: {
artistUrl: username,
},
@ -114,37 +115,38 @@ async function handler(ctx) {
body: {
operationName: 'loadArtistSheets',
query: /* GraphQL */ `
query loadArtistSheets($data: SheetSearchInput!) {
sheetSearch(data: $data) {
list {
productId
productType
metaSong
metaMaker
metaMusician
metaMemo
instruments
createdAt
level
price
sheetId
status
author {
name
artistUrl
profileUrl
query loadArtistSheets($data: SheetSearchInput!) {
sheetSearch(data: $data) {
list {
productId
productType
metaSong
metaMaker
metaMusician
metaMemo
instruments
createdAt
level
price
sheetId
status
author {
name
artistUrl
profileUrl
}
youtubeId
title
supportCountry
excludeCountries
__typename
}
total
current
listNum
}
}
youtubeId
title
supportCountry
excludeCountries
__typename
}
total
current
listNum
}
}`,
`,
variables: {
data: {
listNum: 10,

View File

@ -29,21 +29,23 @@ export const route: Route = {
async function handler() {
const { data } = await got.post('https://lcen.xiaote.net//api/graphql/', {
json: {
query: /* GraphQL */ `query($startCursor: Int) {
communities(startCursor: $startCursor) {
edges {
node {
objectId
content
createdAt
imageUrls
user{
nickname
query: /* GraphQL */ `
query ($startCursor: Int) {
communities(startCursor: $startCursor) {
edges {
node {
objectId
content
createdAt
imageUrls
user {
nickname
}
}
}
}
}
}
}`,
`,
},
});