diff src/private/tools/config_save.txt.luan @ 3:43814e9f5802

add config
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 21 Oct 2023 22:52:41 -0600
parents
children 552d6f944acb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/private/tools/config_save.txt.luan	Sat Oct 21 22:52:41 2023 -0600
@@ -0,0 +1,14 @@
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local stringify = Luan.stringify or error()
+local Io = require "luan:Io.luan"
+local Http = require "luan:http/Http.luan"
+local Config = require "site:/lib/Config.luan"
+
+
+return function()
+	local config = Http.request.parameters.config or error()
+	Config.set(config)
+	Io.stdout = Http.response.text_writer()
+	%>saved<%
+end