add api token to projects listing

This commit is contained in:
Christine Dodrill 2015-02-01 00:22:32 -08:00
parent 8b562c6544
commit 53c637b7e7
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,10 @@ class Projects extends lapis.Application
[projects: "/projects"]: =>
res, code = http.simple {
url: "https://api.github.com/users/Xe/repos"
headers: {
["User-Agent"]: "http://christine.website #{os.getenv "GIT_REV"}"
["Authorization"]: "token #{os.getenv "GITHUB_TOKEN"}"
}
}
if code != 200