add wake on lan
This commit is contained in:
@@ -3,11 +3,7 @@ var UserModel = require('../models/userModel');
|
||||
module.exports = {
|
||||
|
||||
create: async function (req, res) {
|
||||
console.log(req.body);
|
||||
const pass = req.body.password;
|
||||
const omdb_key = req.body.omdb_key;
|
||||
const twitch_client_id = req.body.twitch_client_id;
|
||||
const twitch_client_secret = req.body.twitch_client_secret;
|
||||
const pass = req.body.pass;
|
||||
|
||||
try {
|
||||
const userFound = await UserModel.findOne({ pass: pass });
|
||||
@@ -16,10 +12,11 @@ module.exports = {
|
||||
}
|
||||
|
||||
const user = new UserModel({
|
||||
pass: pass,
|
||||
omdb_key: omdb_key,
|
||||
twitch_client_id: twitch_client_id,
|
||||
twitch_client_secret: twitch_client_secret,
|
||||
pass,
|
||||
omdb_key: req.body.omdb_key,
|
||||
twitch_client_id: req.body.twitch_client_id,
|
||||
twitch_client_secret: req.body.twitch_client_secret,
|
||||
mac_address: req.body.mac_address,
|
||||
});
|
||||
|
||||
await user.save();
|
||||
@@ -30,9 +27,6 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* mediaController.delete()
|
||||
*/
|
||||
remove: async function (req, res) {
|
||||
try {
|
||||
await userFound.remove();
|
||||
|
Reference in New Issue
Block a user