srgooglo 33fe2044c4 Refactor users service routes and add websocket support
- Standardize middleware naming to useMiddlewares - Add websocket
support and handleWsUpgrade to users service - Update getFollowers to
support pagination and return metadata - Emit user update events via
websockets - Add linebridge^1.0.0 dependency - Minor code style and
consistency improvements across routes
2025-07-04 14:16:21 +02:00

13 lines
237 B
JavaScript

import { UserDHKeyPair } from "@db_models"
export default {
useMiddlewares: ["withAuthentication"],
fn: async (req) => {
const userId = req.auth.session.user_id
return await UserDHKeyPair.findOne({
user_id: userId,
})
},
}