Skip to content

Commit 17c8352

Browse files
authored
Merge pull request #5 from 9551-Dev/patch-1
added _GIT_API_KEY for switchcraft use
2 parents c77e28a + 9d764dd commit 17c8352

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cosu.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function update(event, ...)
200200
elseif event == "check" then
201201
--[[ Check updates ]]
202202
if http then
203-
local gitAPI=http.get(sGithub.api)
203+
local gitAPI=http.get(sGithub.api,_G._GIT_API_KEY and {Authorization="token ".._G._GIT_API_KEY})
204204
if gitAPI.getResponseCode()==200 then
205205
local tGitContent = textutils.unserialiseJSON(gitAPI.readAll())
206206
if tGitContent.tag_name ~= sVersion then
@@ -2227,4 +2227,4 @@ if type(running) == "number" then
22272227
end
22282228
sleep(0.5)
22292229
end
2230-
end
2230+
end

0 commit comments

Comments
 (0)