Skip to content

Commit bdedc7e

Browse files
att
1 parent ba0ad54 commit bdedc7e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/session/extra.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
PublicSession.get_session_id = function(public, private)
22
return private.session_id
3+
end
4+
5+
PublicSession.accept_alert = function(public, private)
6+
local result = private.fetch({
7+
url = private.url .. "/session/" .. private.session_id .. "/alert/accept",
8+
method = "POST",
9+
http_version = "1.1"
10+
})
11+
12+
if result.status_code ~= 200 then
13+
error("Failed to accept alert: " .. result.read_body())
14+
end
315
end

0 commit comments

Comments
 (0)