mirror of
https://github.com/lune-org/lune.git
synced 2024-12-14 06:00:42 +00:00
21 lines
360 B
Lua
21 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
|