find by id instead query

This commit is contained in:
srgooglo 2022-05-12 21:04:51 +02:00
parent 7691702c10
commit cb562d1c65

View File

@ -19,7 +19,7 @@ export default class StreamingController extends Controller {
// if the user already has a key, it will be regenerated // if the user already has a key, it will be regenerated
// get username from user_id // get username from user_id
const userData = await User.findOne({ user_id: user_id }) const userData = await User.findById(user_id)
const streamingKey = new StreamingKey({ const streamingKey = new StreamingKey({
user_id, user_id,