feat(rss-feed): add configurable description max length (#7051)
Co-authored-by: ajnart <thomas@ajnart.dev>
This commit is contained in:
1 parent
a7fac57d62
commit
68238fa69b
6 files changed
+21
-1
No files matched your search
@@ -28,6 +28,7 @@ const redactFeedFailureMessage = (message: string) => message.replace(/https?:\/
|
||||
const feedsInput = z.object({
|
||||
urls: z.array(z.string()).max(100),
|
||||
maximumAmountPosts: z.number(),
|
||||
descriptionMaxLength: z.number().int().min(1).max(5000).default(250),
|
||||
});
|
||||
|
||||
export const rssFeedRouter = createTRPCRouter({
|
||||
@@ -43,6 +44,7 @@ export const rssFeedRouter = createTRPCRouter({
|
||||
const innerHandler = rssFeedsRequestHandler.handler({
|
||||
url,
|
||||
count: input.maximumAmountPosts,
|
||||
descriptionMaxLength: input.descriptionMaxLength,
|
||||
});
|
||||
return await innerHandler.getDataAsync();
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user