sdk-generator icon indicating copy to clipboard operation
sdk-generator copied to clipboard

🚀 Feature: Regarding naming convention from updateStatus() function to blockUser() function

Open raman04-byte opened this issue 1 year ago • 2 comments

🔖 Feature description

Existing functionality

To block the user from the client-sdk (such as Flutter SDK) we have to call the updateStatus() function to block the user on the Appwrite Cloud but the task the function is doing is to block the user on the Cloud

🎤 Pitch

Suggestion

Well the main task of the updateStatus() function is to block the user so it makes much more sense to refactor the name of the updateStatus() to blockUser() so that the new developers can use that function and easily find them

Problem

Well, I faced a similar issue when I wanted to use the blockUser function so I had to look into the docs of how to perform that and it took time so if it was named blockUser() it would be simple and easy to use the function.

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

raman04-byte avatar Jun 13 '24 17:06 raman04-byte

I think this might not be a simple change as the specs for the SDKs refer to use updateStatus. A change like this would require changes across all Server SDKs.


Another point to note that the method doesn't only block a user, but can also be used to unblock the user. Atleast thats the behaviour as per docs, see - https://appwrite.io/docs/references/cloud/server-dart/users#updateStatus.

Although I agree that the naming doesn't really confer to what its actually doing. Lets wait for a core member to bump on this.

ItzNotABug avatar Jun 13 '24 17:06 ItzNotABug

It was a suggestion as it would be helpful for the new dev who is using appwrite for the first time and not familiar with the functions and updateStatus() didn't give much of an idea of what function is going to act.

raman04-byte avatar Jun 13 '24 18:06 raman04-byte

Closing this issue as for the time being, there are no plans to update the function's name. And as @ItzNotABug pointed out, the function serves another purpose of unblocking the user.

ChiragAgg5k avatar May 12 '25 06:05 ChiragAgg5k