this repo has no description
atproto bluesky typescript express

uh

Changed files
+10 -12
src
routes
views
+9 -10
src/routes/main.ts
··· 16 16 17 17 import { getReviews } from "../reviews.js"; 18 18 import { PUBLIC_URL } from "../env.js"; 19 - import auth from "../lib/auth.js"; 20 19 21 20 const router = Router(); 22 21 ··· 84 83 follows: follows, 85 84 usertheme: theme, 86 85 bg: bg, 87 - curuser: req.cookies.handle, 86 + curuser: req.session.handle, 88 87 year: new Date().getFullYear(), 89 88 }); 90 89 }); ··· 102 101 follows: follows, 103 102 usertheme: theme, 104 103 bg: bg, 105 - curuser: req.cookies.handle, 104 + curuser: req.session.handle, 106 105 year: new Date().getFullYear(), 107 106 }); 108 107 }, ··· 123 122 followers: followers, 124 123 usertheme: theme, 125 124 bg: bg, 126 - curuser: req.cookies.handle, 125 + curuser: req.session.handle, 127 126 year: new Date().getFullYear(), 128 127 }); 129 128 }, ··· 142 141 post: post, 143 142 usertheme: theme, 144 143 bg: bg, 145 - curuser: req.cookies.handle, 144 + curuser: req.session.handle, 146 145 year: new Date().getFullYear(), 147 146 }); 148 147 }); 149 148 150 149 router.get("/tw/search", async (req: Request, res: Response) => { 151 - const did = await getActorDid(agent, req.cookies.handle); 150 + const did = await getActorDid(agent, (req as any).session.handle); 152 151 const { theme, bg } = await loadTheme(agent, did); 153 152 154 153 res.render("search_users", { ··· 156 155 title: "Bluesky / people search", 157 156 usertheme: theme, 158 157 bg: bg, 159 - curuser: req.cookies.handle, 158 + curuser: req.session.handle, 160 159 year: new Date().getFullYear(), 161 160 }); 162 161 }); ··· 164 163 router.get("/tw/search/users", async (req: Request, res: Response) => { 165 164 const { q } = req.query; 166 165 const actors = await searchActors(pubagent, q as string); 167 - const did = await getActorDid(agent, req.cookies.handle); 166 + const did = await getActorDid(agent, (req as any).session.handle); 168 167 const { theme, bg } = await loadTheme(agent, did); 169 168 170 169 res.render("results_users", { ··· 174 173 actor: actors, 175 174 usertheme: theme, 176 175 bg: bg, 177 - curuser: req.cookies.handle, 176 + curuser: req.session.handle, 178 177 year: new Date().getFullYear(), 179 178 }); 180 179 }); ··· 192 191 cursor: feed.cursor, 193 192 feedData: feedData, 194 193 record: req.params.record, 195 - curuser: req.cookies.handle, 194 + curuser: req.session.handle, 196 195 year: new Date().getFullYear(), 197 196 }); 198 197 },
+1 -1
views/partials/friends.hbs
··· 2 2 {{#each follows}} 3 3 <span class="vcard"> 4 4 <a href="../profile/{{this.handle}}" class="url" rel="contact" title="{{this.displayName}}"> 5 - <img alt="{{this.displayName}}" class="photo fn" height="24" id="profile-image" src="{{this.avatar}}" width="24" /> 5 + <img alt="{{this.displayName}}" class="photo fn" height="24" id="profile-image" src="{{this.avatar}}" width="24" /> 6 6 </a> 7 7 </span> 8 8 {{/each}}
-1
views/partials/mobilefooter.hbs
··· 1 1 {{#if curuser}} 2 2 <br /> 3 3 <div><a href="/m/home">Home</a></div> 4 - <div><a href="/m/replies">@{{curuser}}</a></div> 5 4 <div><a href="/m/profile/{{curuser}}">Your Profile</a></div> 6 5 <div><a href="/m/profile/{{curuser}}/following">People You Follow</a></div> 7 6 <form method="post" action="../signout" class="a">