diff --git a/website/src/controllers/api-v2/user.js b/website/src/controllers/api-v2/user.js index caf3c092a4..5e40f8162f 100644 --- a/website/src/controllers/api-v2/user.js +++ b/website/src/controllers/api-v2/user.js @@ -1,5 +1,3 @@ -/* @see ./routes.coffee for routing*/ - var url = require('url'); var ipn = require('paypal-ipn'); var _ = require('lodash'); @@ -66,10 +64,6 @@ var findTask = function(req, res) { --------------- */ -/** - This is called form deprecated.coffee's score function, and the req.headers are setup properly to handle the login - Export it also so we can call it from deprecated.coffee -*/ api.score = function(req, res, next) { var id = req.params.id, direction = req.params.direction, @@ -546,7 +540,7 @@ api.sessionPartyInvite = function(req,res,next){ } /** - * All other user.ops which can easily be mapped to habitrpg-shared/index.coffee, not requiring custom API-wrapping + * All other user.ops which can easily be mapped to common/script/index.js, not requiring custom API-wrapping */ _.each(shared.wrap({}).ops, function(op,k){ if (!api[k]) { diff --git a/website/src/controllers/payments/index.js b/website/src/controllers/payments/index.js index fd7f98a9c2..465fb31d01 100644 --- a/website/src/controllers/payments/index.js +++ b/website/src/controllers/payments/index.js @@ -1,4 +1,3 @@ -/* @see ./routes.coffee for routing*/ var _ = require('lodash'); var shared = require('../../../../common'); var nconf = require('nconf'); diff --git a/website/src/controllers/payments/paypalBillingSetup.js b/website/src/controllers/payments/paypalBillingSetup.js index ce238338f1..8130de99cc 100644 --- a/website/src/controllers/payments/paypalBillingSetup.js +++ b/website/src/controllers/payments/paypalBillingSetup.js @@ -2,7 +2,6 @@ // payment plan definitions, instead you have to create it via their REST SDK and keep it updated the same way. So this // file will be used once for initing your billing plan (then you get the resultant plan.id to store in config.json), // and once for any time you need to edit the plan thereafter -require('coffee-script'); var path = require('path'); var nconf = require('nconf'); _ = require('lodash'); @@ -90,4 +89,4 @@ switch(OP) { }); break; case "remove": break; -} \ No newline at end of file +} diff --git a/website/src/libs/analytics.js b/website/src/libs/analytics.js index 769a5cf8e1..442c4b9b5c 100644 --- a/website/src/libs/analytics.js +++ b/website/src/libs/analytics.js @@ -1,4 +1,3 @@ -require('coffee-script'); require('./i18n'); var _ = require('lodash'); diff --git a/website/src/routes/api-v2/swagger.js b/website/src/routes/api-v2/swagger.js index d93cfe6271..a1500ac39a 100644 --- a/website/src/routes/api-v2/swagger.js +++ b/website/src/routes/api-v2/swagger.js @@ -2,13 +2,11 @@ ---------- /api/v2 API ------------ see https://github.com/wordnik/swagger-node-express Every url added to router is prefaced by /api/v2 -Note: Many user-route ops exist in ../../common/script/index.coffee#user.ops, so that they can (1) be called both +Note: Many user-route ops exist in ../../common/script/index.js#user.ops, so that they can (1) be called both client and server. v1 user. Requires x-api-user (user id) and x-api-key (api key) headers, Test with: -$ mocha test/user.mocha.coffee */ -require('coffee-script'); var user = require("../../controllers/api-v2/user"); var groups = require("../../controllers/api-v2/groups"); var members = require("../../controllers/api-v2/members"); @@ -295,7 +293,7 @@ module.exports = function(swagger, v2) { spec: { method: 'POST', description: "Casts a spell on a target.", - parameters: [path('spell', "The key of the spell to cast (see ../../common#content/index.coffee)", 'string'), query('targetType', "The type of object you're targeting", 'string', ['party', 'self', 'user', 'task']), query('targetId', "The ID of the object you're targeting", 'string')] + parameters: [path('spell', "The key of the spell to cast (see ../../common#content/index.js)", 'string'), query('targetType', "The type of object you're targeting", 'string', ['party', 'self', 'user', 'task']), query('targetId', "The ID of the object you're targeting", 'string')] }, action: user.cast }, @@ -772,6 +770,6 @@ module.exports = function(swagger, v2) { swagger["add" + route.spec.method](route); return true; }); - + return swagger.configure((nconf.get('BASE_URL')) + "/api/v2", "2"); }; diff --git a/website/src/server.js b/website/src/server.js index 94bffe592b..f166cfb190 100644 --- a/website/src/server.js +++ b/website/src/server.js @@ -20,7 +20,6 @@ if (cores!==0 && cluster.isMaster && (isDev || isProd)) { }); } else { - require('coffee-script'); // remove this once we've fully converted over var express = require("express"); var http = require("http"); var path = require("path"); @@ -100,7 +99,7 @@ if (cores!==0 && cluster.isMaster && (isDev || isProd)) { // Route requests to the right app app.use(app.router); // Matches all request except the ones going to /api/v3/** - app.all(/^(?!\/api\/v3).+/i, oldApp); + app.all(/^(?!\/api\/v3).+/i, oldApp); // Matches all requests going to /api/v3 app.all('/api/v3', newApp); @@ -159,4 +158,4 @@ if (cores!==0 && cluster.isMaster && (isDev || isProd)) { }); module.exports = server; -} \ No newline at end of file +}