+1
-27
src/routes/oauth/callback/+server.ts
+1
-27
src/routes/oauth/callback/+server.ts
···
18
18
const sessionManager = await getSessionManager();
19
19
await sessionManager.createAndSetSession(event, session.did, atpSession.data.handle);
20
20
21
-
// const agent = new Agent(session);
22
-
// const dateStamp = new Date().toISOString();
23
-
// let token
24
-
// await agent.com.atproto.repo.createRecord({
25
-
// collection: 'app.bsky.feed.post',
26
-
// record: {
27
-
// $type: 'app.bsky.feed.post',
28
-
// text: 'I found Bailey\'s new SvelteKit template before he finished it and wrote documentation for it. I probably should of checked what it did first.',
29
-
// langs: [
30
-
// 'en'
31
-
// ],
32
-
// reply: {
33
-
// root: {
34
-
// cid: 'bafyreigxcmxkn6egt5ykybaaztnbbkq74facddwva65bwxfyfqrevtpk64',
35
-
// uri: 'at://did:plc:rnpkyqnmsw4ipey6eotbdnnf/app.bsky.feed.post/3m7mi36bsp22u'
36
-
// },
37
-
// parent: {
38
-
// cid: 'bafyreigxcmxkn6egt5ykybaaztnbbkq74facddwva65bwxfyfqrevtpk64',
39
-
// uri: 'at://did:plc:rnpkyqnmsw4ipey6eotbdnnf/app.bsky.feed.post/3m7mi36bsp22u'
40
-
// }
41
-
// },
42
-
// createdAt: dateStamp,
43
-
// }, repo: session.did, validate: true
44
-
//
45
-
// }
46
-
47
-
return redirect(302, '/demo');
21
+
return redirect(302, '/demo');
48
22
49
23
}catch (err){
50
24
//redirects are errors, so this passes it along