v3 adapt v2: port tags, cast, cron, deletUser and removeMember. Fix a few bugs in v3

This commit is contained in:
Matteo Pagliazzi
2016-04-06 19:28:43 +02:00
parent 08239345b5
commit b431b02012
25 changed files with 409 additions and 218 deletions
+2
View File
@@ -1,5 +1,7 @@
import uuid from '../libs/uuid';
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
if (user.tags == null) {
user.tags = [];
+2
View File
@@ -1,6 +1,8 @@
import i18n from '../i18n';
import _ from 'lodash';
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
var i, tag, tid;
tid = req.params.id;
+2
View File
@@ -1,5 +1,7 @@
import i18n from '../i18n';
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
var i, ref, task;
task = user.tasks[(ref = req.params) != null ? ref.id : void 0];
+2
View File
@@ -1,6 +1,8 @@
import _ from 'lodash';
import i18n from '../i18n';
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
var i, tid;
tid = req.params.id;
+2
View File
@@ -1,3 +1,5 @@
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
return typeof cb === "function" ? cb(null, user.tags) : void 0;
};
+2
View File
@@ -1,3 +1,5 @@
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
var from, ref, to;
ref = req.query, to = ref.to, from = ref.from;
+2
View File
@@ -1,6 +1,8 @@
import i18n from '../i18n';
import preenTodos from '../libs/preenTodos';
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
var from, id, movedTask, preenedTasks, ref, task, tasks, to;
id = req.params.id;
+2
View File
@@ -1,6 +1,8 @@
import i18n from '../i18n';
import _ from 'lodash';
// TODO used only in client, move there?
module.exports = function(user, req, cb) {
var i, tid;
tid = req.params.id;