♻️ Refactor urls with aliased services
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
export default defineSitemapEventHandler(async () => {
|
||||
const config = useRuntimeConfig();
|
||||
|
||||
const res = await fetch(`${config.public.solarNetworkApi}/cgi/interactive/posts/minimal?take=500`)
|
||||
const res = await fetch(`${config.public.solarNetworkApi}/cgi/co/posts/minimal?take=500`)
|
||||
const result = await res.json()
|
||||
|
||||
return result.data.map((item: any) => asSitemapUrl({
|
||||
|
@ -19,13 +19,13 @@ export default defineEventHandler((event) => {
|
||||
"subject_types_supported": [
|
||||
"public",
|
||||
],
|
||||
"token_endpoint": `${config.public.solarNetworkApi}/cgi/auth/auth/token`,
|
||||
"token_endpoint": `${config.public.solarNetworkApi}/cgi/id/auth/token`,
|
||||
"token_endpoint_auth_methods_supported": [
|
||||
"client_secret_post",
|
||||
],
|
||||
"token_endpoint_auth_signing_alg_values_supported": [
|
||||
"HS512",
|
||||
],
|
||||
"userinfo_endpoint": `${config.public.solarNetworkApi}/cgi/auth/users/me`,
|
||||
"userinfo_endpoint": `${config.public.solarNetworkApi}/cgi/id/users/me`,
|
||||
}
|
||||
})
|
||||
|
@ -39,7 +39,7 @@ export default defineEventHandler(async (event) => {
|
||||
searchQuery.set("author", queries.author)
|
||||
}
|
||||
|
||||
const res = await fetch(`${config.public.solarNetworkApi}/cgi/interactive/posts?` + searchQuery)
|
||||
const res = await fetch(`${config.public.solarNetworkApi}/cgi/co/posts?` + searchQuery)
|
||||
const posts: any[] = (await res.json())["data"]
|
||||
|
||||
for (const post of posts) {
|
||||
@ -64,7 +64,7 @@ export default defineEventHandler(async (event) => {
|
||||
link: `https://solsynth.dev/@${post.author.name}`,
|
||||
},
|
||||
],
|
||||
image: post.body.thumbnail ? `${config.public.solarNetworkApi}/cgi/files/attachments/${post.body.thumbnail}` : void 0,
|
||||
image: post.body.thumbnail ? `${config.public.solarNetworkApi}/cgi/uc/attachments/${post.body.thumbnail}` : void 0,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user