summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_delete.lua
blob: 0c3cc1865bdc271dc1800b89821c58a8afe75896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Copyright 2017 Dirk Brenken (dev@brenken.org)
-- This is free software, licensed under the Apache License, Version 2.0

local uci = require("luci.model.uci").cursor()
local http = require("luci.http")
local cfg = http.formvalue("cfg")

if cfg ~= nil then
	uci:delete("wireless", cfg)
	uci:save("wireless")
	uci:commit("wireless")
end
http.redirect(luci.dispatcher.build_url("admin/services/travelmate/stations"))