mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
20 lines
439 B
JavaScript
Executable File
20 lines
439 B
JavaScript
Executable File
import getMutuals from "@services/getMutuals"
|
|
|
|
export default {
|
|
method: "GET",
|
|
route: "/quick",
|
|
middlewares: ["withAuthentication"],
|
|
fn: async (req, res) => {
|
|
let mutuals = await getMutuals({
|
|
from_user_id: req.user._id.toString(),
|
|
}).catch((error) => {
|
|
console.error(error)
|
|
|
|
return []
|
|
})
|
|
|
|
return res.json({
|
|
friends: mutuals,
|
|
})
|
|
}
|
|
} |