refactor out github API use

This commit is contained in:
Christine Dodrill 2015-02-06 14:07:26 -08:00
parent 256c58c608
commit 8e5068cdb2
3 changed files with 2 additions and 10 deletions

View File

@ -1,4 +1,3 @@
gh = require('github').new({access_token: os.getenv "GITHUB_TOKEN", httpclient_driver: 'httpclient.ngx_driver'})
lapis = require "lapis" lapis = require "lapis"
class extends lapis.Application class extends lapis.Application
@ -9,13 +8,6 @@ class extends lapis.Application
@include "controllers.go" @include "controllers.go"
[index: "/"]: => [index: "/"]: =>
@user, err = gh\get_authenticated_user()
if err
@err = err
return status: 500, render: "error"
render: true render: true
[contact: "/contact"]: => [contact: "/contact"]: =>

BIN
static/img/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -9,8 +9,8 @@ class About extends Widget
a href: "/contact", class: "follow_btn hidden-xs", "Contact Me" a href: "/contact", class: "follow_btn hidden-xs", "Contact Me"
div class: "col-md-8 col-xs-12", -> div class: "col-md-8 col-xs-12", ->
img src: @user.avatar_url, class: "img-thumbnail picture hidden-xs" img src: "/static/img/avatar.png", class: "img-thumbnail picture hidden-xs"
img src: @user.avatar_url, class: "img-thumbnail picture visible-xs picture_mob" img src: "/static/img/avatar.png", class: "img-thumbnail picture visible-xs picture_mob"
div class: "header", -> div class: "header", ->
h1 "Christine Dodrill" h1 "Christine Dodrill"