From 49406c99fa13fb3ec9291e3c77d06d9e18f64503 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 5 Aug 2014 11:57:43 +0200 Subject: [PATCH] Moves auth functionality to its own directory --- app/{models/apikey_auth.js => auth/apikey.js} | 0 app/{models => auth}/oauth.js | 0 app/controllers/app.js | 4 ++-- test/unit/oauth.test.js | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename app/{models/apikey_auth.js => auth/apikey.js} (100%) rename app/{models => auth}/oauth.js (100%) diff --git a/app/models/apikey_auth.js b/app/auth/apikey.js similarity index 100% rename from app/models/apikey_auth.js rename to app/auth/apikey.js diff --git a/app/models/oauth.js b/app/auth/oauth.js similarity index 100% rename from app/models/oauth.js rename to app/auth/oauth.js diff --git a/app/controllers/app.js b/app/controllers/app.js index c04dadfd..07916532 100755 --- a/app/controllers/app.js +++ b/app/controllers/app.js @@ -33,11 +33,11 @@ var express = require('express') , Profiler = require('step-profiler') , StatsD = require('node-statsd').StatsD , MetadataDB = require('cartodb-redis') - , oAuth = require(global.settings.app_root + '/app/models/oauth') , PSQL = require(global.settings.app_root + '/app/models/psql') , PSQLWrapper = require(global.settings.app_root + '/app/sql/psql_wrapper') , CdbRequest = require(global.settings.app_root + '/app/models/cartodb_request') - , ApiKeyAuth = require(global.settings.app_root + '/app/models/apikey_auth') + , oAuth = require(global.settings.app_root + '/app/auth/oauth') + , ApiKeyAuth = require(global.settings.app_root + '/app/auth/apikey') , _ = require('underscore') , LRU = require('lru-cache') , formats = require(global.settings.app_root + '/app/models/formats') diff --git a/test/unit/oauth.test.js b/test/unit/oauth.test.js index 83213774..d92fef79 100644 --- a/test/unit/oauth.test.js +++ b/test/unit/oauth.test.js @@ -2,7 +2,7 @@ require('../helper'); var _ = require('underscore') , redis = require("redis") - , oAuth = require('../../app/models/oauth') + , oAuth = require('../../app/auth/oauth') , assert = require('assert') , tests = module.exports = {} , oauth_data_1 = {