Added template, route and barebone controller for Tumblr api
This commit is contained in:
1
app.js
1
app.js
@ -56,6 +56,7 @@ app.get('/admin', passportConf.ensureAuthenticated, passportConf.ensureAdmin(),
|
|||||||
app.get('/partials/:name', home.partials);
|
app.get('/partials/:name', home.partials);
|
||||||
app.get('/api', api.apiBrowser);
|
app.get('/api', api.apiBrowser);
|
||||||
app.get('/api/foursquare', passportConf.ensureAuthenticated, api.foursquare);
|
app.get('/api/foursquare', passportConf.ensureAuthenticated, api.foursquare);
|
||||||
|
app.get('/api/tumblr', passportConf.ensureAuthenticated, api.tumblr);
|
||||||
app.get('/contact', contact.getContact);
|
app.get('/contact', contact.getContact);
|
||||||
app.post('/contact', contact.postContact);
|
app.post('/contact', contact.postContact);
|
||||||
|
|
||||||
|
@ -42,6 +42,15 @@ exports.foursquare = function(req, res) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
exports.tumblr = function(req, res) {
|
||||||
|
|
||||||
|
res.render('api/tumblr', {
|
||||||
|
title: 'Tumblr API',
|
||||||
|
user: req.user
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /auth/foursquare
|
* GET /auth/foursquare
|
||||||
* Display Foursquare authentication screen
|
* Display Foursquare authentication screen
|
||||||
|
@ -3,4 +3,8 @@ extends layout
|
|||||||
block content
|
block content
|
||||||
h1 API Browser
|
h1 API Browser
|
||||||
|
|
||||||
a(href='/api/foursquare') Foursquare
|
ul.list-unstyled
|
||||||
|
li
|
||||||
|
a(href='/api/foursquare') Foursquare
|
||||||
|
li
|
||||||
|
a(href='/api/tumblr') Tumblr
|
10
views/api/tumblr.jade
Normal file
10
views/api/tumblr.jade
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
extends ../layout
|
||||||
|
|
||||||
|
block content
|
||||||
|
.page-header
|
||||||
|
h1
|
||||||
|
i.fa.fa-tumblr-square
|
||||||
|
| Tumblr API
|
||||||
|
|
||||||
|
if !user.tokens.foursquare
|
||||||
|
a.btn.btn-large.btn-primary(href='/auth/tumblr') Get Tumblr Token
|
Reference in New Issue
Block a user