Skip to content

Conversation

@junaidjoni995
Copy link

No description provided.

Copy link
Member

@tahiralmas tahiralmas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments, and update the code accordingly

/**
* Export Csv
*
* @url GET /export/users
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow project standard for url, note the ending s in users and /csv suffix for file format
@url GET /users/csv

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLs resolved

* @url GET /export/users
*
*/
public function export_list($query = array())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this code into UserApi.php and drop this file
also rename it to export_csv, as we are going to delete the following function with the same name

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved


$oUser=array();

$oUser = new User($user_id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to export single user record to csv, if needed it can be filtered via above created export_csv function, see the search filter.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

/**
* Export User by User id
*
* @url GET /export/user/$user_id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this function in favor of sample_csv

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped

/**
* Provide User Sample
*
* @url GET /export/users/sample
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. use project standard format for url
    @url GET users/sample/csv

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLs resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants