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