mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
20 lines
360 B
Lua
20 lines
360 B
Lua
local util = {}
|
|
|
|
function util.pass(method, url, message: string)
|
|
local response = net.request({
|
|
method = method,
|
|
url = url,
|
|
})
|
|
assert(response.ok, message)
|
|
end
|
|
|
|
function util.fail(method, url, message: string)
|
|
local response = net.request({
|
|
method = method,
|
|
url = url,
|
|
})
|
|
console.log(response)
|
|
assert(not response.ok, message)
|
|
end
|
|
|
|
return util
|