Skip to content

Import Users CSV API#10

Open
junaidjoni995 wants to merge 1 commit into
ictinnovations:masterfrom
junaidjoni995:patch-2
Open

Import Users CSV API#10
junaidjoni995 wants to merge 1 commit into
ictinnovations:masterfrom
junaidjoni995:patch-2

Conversation

@junaidjoni995

Copy link
Copy Markdown

No description provided.

@tahiralmas tahiralmas left a comment

Copy link
Copy Markdown
Member

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

Comment thread core/Api/importCsvApi.php
Comment thread core/Api/importCsvApi.php
fclose($csvFile);

if(empty($errors)){
return "User Ids: ".json_encode($newUsers);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of array of IDs, returning the count is sufficient .

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

Comment thread core/Api/importCsvApi.php
* @url POST /import/users
*
*/
public function import_csv($data = array(), $mime = 'text/csv')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move this function into UserApi.php and drop this file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Moved to UserApi.php

Comment thread core/Api/importCsvApi.php
*
* @url GET /import/users/sample
*/
public function sample_csv()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no need to repeat this sample

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed

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