Skip to content

Commit

Permalink
added more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Oct 31, 2017
1 parent eb44455 commit 65b8bd9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kbase-extension/static/kbase/js/api/fileStaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ define([
/**
* @method
* @public
* Makes the /search call to the FTP service. This should return a list of files, similar to
* the list() function.
*
* This goes on to create a subdir attribute in each file before returning. This subdir
* is relative to the user's directory, as opposed to the FTP service root (which is the
* usually returned value).
* That is, it'll go from
* /data/bulk/some_user/some_directory/some_file
* to
* some_user/some_directory/some_file
*/
var search = function(term) {
var path = 'search/' + encodeURIComponent(term);
Expand All @@ -92,6 +102,7 @@ define([
/**
* Wraps up the actual AJAX REST call. Given a method and path, it will populate headers
* as needed, then return a Promise with the call.
* It's pretty simple right now, we can adjust as needed.
*/
var makeFtpCall = function(method, path) {
return Promise.resolve($.ajax({
Expand Down

0 comments on commit 65b8bd9

Please sign in to comment.