Skip to content

Conversation

@MostafaFawzy7
Copy link
Contributor

I changed here the name of get method to getAll, WTD all? @SirNarsh @HassanElZarkawy @Moamen-Elgammal @amrography @Abdallah-Abdelkhalek

@HassanElZarkawy
Copy link
Collaborator

I'm somewhat against this idea. The get function used to correspond to the HTTP method that the client makes, get() -> GET
and its the case also for all the different methods, such as post, patch and delete.

If you want this to change, then you'll need to also change every other function name, which to be honest doesn't make any sense to me.

@Abdallah-Abdelkhalek
Copy link

I don't like this change. Get is better than getAll.

@MostafaFawzy7
Copy link
Contributor Author

@HassanElZarkawy @Abdallah-Abdelkhalek Reverted the name! ✅

@HassanElZarkawy
Copy link
Collaborator

@MostafaFawzy7 One thing I noticed, is that delete<T>() returns a Promise<T> which is not accurate at all. delete() shouldn't be returning a model, at maximum we want it to return boolean that indicates whether the operation was successful or not.

@MostafaFawzy7
Copy link
Contributor Author

@MostafaFawzy7 One thing I noticed, is that delete<T>() returns a Promise<T> which is not accurate at all. delete() shouldn't be returning a model, at maximum we want it to return boolean that indicates whether the operation was successful or not.

I thought that we will need to return the deleted data at some cases!
No problem, let's change this as well...

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.

5 participants