Ejemplo n.º 1
0
    def POST(self, **kwargs) -> str:
        """POST Function"""
        location = kwargs.get("location", None)
        body = self._get_request_body()
        self._check_user()
        self.__check_for_blocked_locations(location)
        value = CONFIG.find_and_get(location)
        CONFIG.find_and_set(location, body["value"])

        return self._return_data(
            "config",
            "set CONFIG Option",
            True,
            location=location,
            before=value,
            after=body["value"],
        )