mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
13 lines
276 B
JavaScript
13 lines
276 B
JavaScript
import { Session } from "@db_models"
|
|
|
|
export default async (payload = {}) => {
|
|
const { user_id } = payload
|
|
|
|
if (!user_id) {
|
|
throw new OperationError(400, "user_id not provided")
|
|
}
|
|
|
|
const sessions = await Session.find({ user_id })
|
|
|
|
return sessions
|
|
} |