return class

This commit is contained in:
William Bell committed 2023-11-11 00:33:27 +00:00
1 parent 32d88ddd63
commit 3468ea57ed
1 file changed
+1
+1
View File
@@ -44,6 +44,7 @@ let server() = do
class.put(callback) = routes.append({path: path, callback: callback, methods: ["PUT"], type: "route"})
class.delete(callback) = routes.append({path: path, callback: callback, methods: ["DELETE"], type: "route"})
class.all(callback) = routes.append({path: path, callback: callback, methods: true, type: "route"})
return class
class.get(path, callback) = class.route(path).get(callback)
class.post(path, callback) = class.route(path).post(callback)
class.put(path, callback) = class.route(path).put(callback)