wifi_delete.lua 416 B

12345678910111213
  1. -- Copyright 2017 Dirk Brenken (dev@brenken.org)
  2. -- This is free software, licensed under the Apache License, Version 2.0
  3. local uci = require("luci.model.uci").cursor()
  4. local http = require("luci.http")
  5. local cfg = http.formvalue("cfg")
  6. if cfg ~= nil then
  7. uci:delete("wireless", cfg)
  8. uci:save("wireless")
  9. uci:commit("wireless")
  10. end
  11. http.redirect(luci.dispatcher.build_url("admin/services/travelmate/stations"))