Skip to content

Commit

Permalink
feat(fotoweb): add reverse PHOTO_METADATA_IDS map
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Jun 10, 2016
1 parent 41240a4 commit 755a3a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/fotoweb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const PHOTO_METADATA_KEYS = new Map([
const PHOTO_MEDADATA = [
['5', 'title'],
['20', 'albums'],
['25', 'tags'],
Expand All @@ -10,7 +10,10 @@ const PHOTO_METADATA_KEYS = new Map([
['220', 'persons'],
['221', 'place'],
['222', 'area'],
]);
];

const PHOTO_METADATA_KEYS = new Map(PHOTO_MEDADATA);
const PHOTO_METADATA_IDS = new Map(PHOTO_MEDADATA.map(key => key.reverse()));

const BASE_URL = process.env.FOTOWEB_BASE_URL;
const API_PATH = process.env.FOTOWEB_API_PATH;
Expand All @@ -37,6 +40,7 @@ const parsePagingLinks = (endpoint, pages) => {

module.exports = {
PHOTO_METADATA_KEYS,
PHOTO_METADATA_IDS,
BASE_URL,
API_PATH,
API_URL,
Expand Down

0 comments on commit 755a3a7

Please sign in to comment.