Ejemplo n.º 1
0
        public ActionResult updateMigrationStatus(int id, int status, [FromHeader] string key)
        {
            if (key == null)
            {
                return(StatusCode(401));
            }
            if (!UserModel.isLogged(key))
            {
                return(StatusCode(401));
            }

            MigrationOperetionModel _migration = MigrationOperetionModel.getMigration(id);

            _migration.status = status;

            MigrationOperetionModel.updateMigration(_migration);

            return(new ObjectResult(_migration));
        }
Ejemplo n.º 2
0
        public ActionResult updateMigrationSeverDetiny(int id, [FromHeader] string key, [FromBody]  ServerModel obj)
        {
            if (key == null)
            {
                return(StatusCode(401));
            }
            if (!UserModel.isLogged(key))
            {
                return(StatusCode(401));
            }

            if (obj == null)
            {
                return(StatusCode(501));
            }

            MigrationOperetionModel _migration = MigrationOperetionModel.getMigration(id);

            _migration.serverDestinyIMAP = obj;

            MigrationOperetionModel.updateMigration(_migration);

            return(new ObjectResult(_migration));
        }