[READ ONLY MIRROR] Spark Social AppView Server
github.com/sprksocial/server
atproto
deno
hono
lexicon
1export const SPRK_USER_AGENT = "SprkAppView";
2export const ATPROTO_CONTENT_LABELERS = "Atproto-Content-Labelers";
3export const ATPROTO_REPO_REV = "Atproto-Repo-Rev";
4
5type ResHeaderOpts = {
6 repoRev: string | null;
7};
8
9export const resHeaders = (
10 opts: Partial<ResHeaderOpts>,
11): Record<string, string> => {
12 const headers: Record<string, string> = {};
13 if (opts.repoRev) {
14 headers[ATPROTO_REPO_REV] = opts.repoRev;
15 }
16 return headers;
17};
18
19export const clearlyBadCursor = (cursor?: string) => {
20 return !!cursor?.includes("::");
21};