Skip to content

Commit dc35f59

Browse files
committed
chore: update cache key if no authors and update commentEmbed type
1 parent 36c0217 commit dc35f59

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

server/api/atproto/author-profiles.get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default defineCachedEventHandler(
8181
maxAge: CACHE_MAX_AGE_ONE_DAY,
8282
getKey: event => {
8383
const { authors } = getQuery(event)
84-
return `author-profiles:${authors}`
84+
return `author-profiles:${authors ?? ''}`
8585
},
8686
},
8787
)

shared/types/blog-post.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import type {
44
AppBskyEmbedImages,
55
AppBskyEmbedExternal,
66
} from '@atproto/api'
7-
export interface CommentEmbed {
8-
type: 'images' | 'external'
9-
images?: AppBskyEmbedImages.ViewImage[]
10-
external?: AppBskyEmbedExternal.ViewExternal
11-
}
7+
8+
export type CommentEmbed =
9+
| { type: 'images'; images: AppBskyEmbedImages.ViewImage[] }
10+
| { type: 'external'; external: AppBskyEmbedExternal.ViewExternal }
1211

1312
export interface Comment {
1413
uri: string

0 commit comments

Comments
 (0)