mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
19 lines
446 B
JavaScript
Executable File
19 lines
446 B
JavaScript
Executable File
import { StreamingProfile } from "@db_models"
|
|
|
|
export default {
|
|
method: "GET",
|
|
route: "/profile/streamkey/:streamkey",
|
|
fn: async (req, res) => {
|
|
const profile = await StreamingProfile.findOne({
|
|
stream_key: req.params.streamkey
|
|
})
|
|
|
|
if (!profile) {
|
|
return res.status(404).json({
|
|
error: "Profile not found"
|
|
})
|
|
}
|
|
|
|
return res.json(profile)
|
|
}
|
|
} |