Ignore:
Timestamp:
03/19/14 21:33:13 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Allow empty subcodes.
  • Use HTTPResult exclusively on server (no more q).
  • Set readonly & disabled on ourselves as well in _ComplexValueMixin
  • Split server into several modules.
  • Check codes on the variable level, not question level.
  • We can add modules in design documents now.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/server/bin/upgrade-db-1-to-2.js

    r487 r525  
    11var env = require('../env')
     2  , HTTPResult = require('../util/http-result')
    23  , upgradeCouch = require('../config/upgrade-couchdb')
    34  , cryptoken = require('../util/crypto-token')
    4   , Q = require('q')
    55  ;
    66upgradeCouch(env.couchServerURL,env.dbName,function(doc){
    7     if ( (doc.type === 'Response' || doc.type === 'SurveyRun') && !doc.secret ) {
    8         return cryptoken(8).then(function(token){
     7    if ( (doc.type === 'Response' || doc.type === 'SurveyRun') &&
     8         !doc.secret ) {
     9        return cryptoken()
     10        .then(function(token){
    911            doc.secret = token;
    1012            return doc;
    1113        });
    1214    } else {
    13         return Q.reject();
     15        return new HTTPResult(-1);
    1416    }
    1517}).then(function(res){
Note: See TracChangeset for help on using the changeset viewer.