Skip to content

Commit 278d6f7

Browse files
authored
feat: add age assurance (#7)
1 parent 226f6f3 commit 278d6f7

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

packages/pds/src/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,27 @@ app.post("/xrpc/com.atproto.server.refreshSession", server.refreshSession);
152152
app.get("/xrpc/com.atproto.server.getSession", server.getSession);
153153
app.post("/xrpc/com.atproto.server.deleteSession", server.deleteSession);
154154

155+
// Actor preferences (stub - returns empty preferences)
156+
app.get("/xrpc/app.bsky.actor.getPreferences", requireAuth, (c) => {
157+
return c.json({ preferences: [] });
158+
});
159+
app.post("/xrpc/app.bsky.actor.putPreferences", requireAuth, async (c) => {
160+
// TODO: persist preferences in DO
161+
return c.json({});
162+
});
163+
164+
// Age assurance (stub - self-hosted users are pre-verified)
165+
app.get("/xrpc/app.bsky.ageassurance.getState", requireAuth, (c) => {
166+
return c.json({
167+
state: {
168+
status: "assured",
169+
access: "full",
170+
lastInitiatedAt: new Date().toISOString(),
171+
},
172+
metadata: {
173+
accountCreatedAt: new Date().toISOString(),
174+
},
175+
});
176+
});
177+
155178
export default app;

0 commit comments

Comments
 (0)