Export: include attachments

This commit is contained in:
Xavier Priour 2015-12-17 11:58:55 +01:00
parent 3a52d7d7af
commit 4cea6fca90
2 changed files with 38 additions and 16 deletions

View file

@ -5,3 +5,24 @@ allowIsBoardAdmin = function(userId, board) {
allowIsBoardMember = function(userId, board) {
return board && board.hasMember(userId);
};
// todo XXX not really server-specific,
// so move it to a common (client+server) lib?
Utils = {
/**
* If text starts with a / will remove it.
* @param text
*/
stripLeadingSlash(text) {
// we need an actual text string
if (!text) {
return text;
}
// if starting with slash
if (text[0] === '/') {
return text.slice(1);
}
// otherwise leave untouched
return text;
},
};