mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add plugin feature 'UnstableOpenScriptsExternally'
This commit is contained in:
parent
102c77b23e
commit
91d45afd0f
3 changed files with 79 additions and 0 deletions
|
|
@ -233,4 +233,19 @@ function ApiContext:retrieveMessages()
|
|||
end)
|
||||
end
|
||||
|
||||
function ApiContext:open(id)
|
||||
local url = ("%s/api/open/%s"):format(self.__baseUrl, id)
|
||||
|
||||
return Http.post(url, "")
|
||||
:andThen(rejectFailedRequests)
|
||||
:andThen(Http.Response.json)
|
||||
:andThen(function(body)
|
||||
if body.sessionId ~= self.__sessionId then
|
||||
return Promise.reject("Server changed ID")
|
||||
end
|
||||
|
||||
return nil
|
||||
end)
|
||||
end
|
||||
|
||||
return ApiContext
|
||||
Loading…
Add table
Add a link
Reference in a new issue