Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

Commit

Permalink
New content api url (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Mar 1, 2018
1 parent 8a7b8a5 commit 4b270e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/handlers/content.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use strict'

import {fetchUrl} from '../helpers/fetch'
const Boom = require('boom')
const logger = require('../../src/lib/logger')
const config = require('../../src/config')

module.exports.getContent = (request, reply) => {
const roles = request.query.roles.split(',').join('|')
const url = `https://content.portalen.win?roles=${roles}`
const url = `${config.contentApiUrl}?roles=${roles}`
logger('info', ['content', 'getContent', url])
fetchUrl(url).then((data) => {
return reply(data)
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const environment = {
}[process.env.NODE_ENV || 'development']

module.exports = Object.assign({
contentApiUrl: 'https://content.portalen.win/api/content',
jwtSecret: process.env.JWT_SECRET || 'Louie Louie, oh no, I got to go Louie Louie, oh no, I got to go',
piwikURL: process.env.PIWIK_URL || 'https://piwik.service.t-fk.no',
piwikSiteID: process.env.PIWIK_SITE_ID || 1,
Expand Down

0 comments on commit 4b270e1

Please sign in to comment.