@@ -11,11 +11,11 @@ if (!userExists) {
1111 db_admin . createUser ( {
1212 user : username ,
1313 pwd : password ,
14- roles : [ { role : "root" , db : "admin" } ]
14+ roles : [ { role : "root" , db : "admin" } ]
1515 } ) ;
1616} else {
1717 print ( `Usuario ${ username } ya existe, actualizando contraseña...` ) ;
18- db_admin . updateUser ( username , { pwd : password } ) ;
18+ db_admin . updateUser ( username , { pwd : password } ) ;
1919}
2020
2121db = db . getSiblingDB ( database ) ;
@@ -57,24 +57,24 @@ db.cultivos.insertMany([
5757
5858db . createCollection ( "actuadores" )
5959db . actuadores . insertMany ( [
60- {
61- "_id" : ObjectId ( "6918e5919fb7e6b79f2a817b" ) ,
62- "crop" : ObjectId ( "672ebd43e9227768a15b11df" ) ,
63- "type" : "HUMIDIFIER" ,
64- "_class" : "app.smartpot.api.actuators.model.entity.Actuator"
65- } ,
66- {
67- "_id" : ObjectId ( "691c063677bd49e238fb35c7" ) ,
68- "crop" : ObjectId ( "672ebd43e9227768a15b11df" ) ,
69- "type" : "WATER_PUMP" ,
70- "_class" : "app.smartpot.api.actuators.model.entity.Actuator"
71- } ,
72- {
73- "_id" : ObjectId ( "691c064e77bd49e238fb35c8" ) ,
74- "crop" : ObjectId ( "672ebd43e9227768a15b11df" ) ,
75- "type" : "UV_LIGHT" ,
76- "_class" : "app.smartpot.api.actuators.model.entity.Actuator"
77- }
60+ {
61+ "_id" : ObjectId ( "6918e5919fb7e6b79f2a817b" ) ,
62+ "crop" : ObjectId ( "672ebd43e9227768a15b11df" ) ,
63+ "type" : "HUMIDIFIER" ,
64+ "_class" : "app.smartpot.api.actuators.model.entity.Actuator"
65+ } ,
66+ {
67+ "_id" : ObjectId ( "691c063677bd49e238fb35c7" ) ,
68+ "crop" : ObjectId ( "672ebd43e9227768a15b11df" ) ,
69+ "type" : "WATER_PUMP" ,
70+ "_class" : "app.smartpot.api.actuators.model.entity.Actuator"
71+ } ,
72+ {
73+ "_id" : ObjectId ( "691c064e77bd49e238fb35c8" ) ,
74+ "crop" : ObjectId ( "672ebd43e9227768a15b11df" ) ,
75+ "type" : "UV_LIGHT" ,
76+ "_class" : "app.smartpot.api.actuators.model.entity.Actuator"
77+ }
7878] )
7979
8080db . createCollection ( 'comandos' ) ;
0 commit comments