Skip to content

Commit

Permalink
Merge pull request #2 from MattouFP/master
Browse files Browse the repository at this point in the history
OneDrive API no longer provides email and modification date, and fixes for #1
  • Loading branch information
AnalogJ committed Jun 12, 2015
2 parents 5ac15f4 + 6da2ba6 commit 45e4bf1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ var transform = {};
transform.accountInfo = function(account_response){
var transform = {};
transform.name = account_response.name;
transform.email = account_response.emails.preferred;
transform.email = '';
transform.avatar_url = '';
transform.created_date = new Date(account_response.updated_time);
transform.modified_date = new Date(account_response.updated_time);
transform.created_date = null;
transform.modified_date = null;
transform.id = account_response.id;
transform._raw = account_response;
return transform;
Expand Down Expand Up @@ -59,8 +59,8 @@ transform.downloadFile = function(download_response){

transform.getFileInformation = function (file_response){
var transform = {};
transform.is_file = (file_response.type != "folder");
transform.is_folder = (file_response.type == "folder");
transform.is_file = true;
transform.is_folder = false;
transform.etag = '';
transform.identifier = file_response.id;
transform.parent_identifier = file_response.parent_id;
Expand Down Expand Up @@ -102,8 +102,8 @@ transform.deleteFolder = function(deletion_response){

transform.getFolderInformation = function(folder_response){
var transform = {};
transform.is_file = (folder_response.type != "folder");
transform.is_folder = (folder_response.type == "folder");
transform.is_file = false;
transform.is_folder = true;
transform.etag = '';
transform.identifier = folder_response.id;
transform.parent_identifier = folder_response.parent_id;
Expand All @@ -121,7 +121,7 @@ transform.retrieveFolderItems = function(items_response){
var transform = {};
transform.total_items = null;
transform.content = items_response.data.map(function(current_item){
if(current_item.type != "folder"){
if(current_item.type != "folder" && current_item.type != "album"){
return self.getFileInformation(current_item);
}
else{
Expand Down

0 comments on commit 45e4bf1

Please sign in to comment.