Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed create team membership from server #340

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ string emailAddressOrErrorMessage = userResponse.Result.Match(

## ⌛ Progress
<!-- `red` for first third, `gold` for second third, `forestgreen` for final third, `blue` for 100% -->
![Server & Client - 126 / 318](https://img.shields.io/badge/Server_&_Client-126%20%2F%20318-gold?style=for-the-badge)
![Server & Client - 125 / 317](https://img.shields.io/badge/Server_&_Client-125%20%2F%20317-gold?style=for-the-badge)

![Server - 66 / 225](https://img.shields.io/badge/Server-66%20%2F%20225-red?style=for-the-badge)
![Server - 65 / 224](https://img.shields.io/badge/Server-65%20%2F%20224-red?style=for-the-badge)

![Client - 60 / 93](https://img.shields.io/badge/Client-60%20%2F%2093-gold?style=for-the-badge)

Expand Down Expand Up @@ -256,7 +256,7 @@ string emailAddressOrErrorMessage = userResponse.Result.Match(
| [Update Phone Verification](https://appwrite.io/docs/references/1.6.x/server-rest/users#updatePhoneVerification) | ❌ | ✅ |

### Teams
![Teams - 26 / 26](https://img.shields.io/badge/Teams-24%20%2F%2026-blue?style=for-the-badge)
![Teams - 25 / 25](https://img.shields.io/badge/Teams-25%20%2F%2025-blue?style=for-the-badge)

| Endpoint | Client | Server |
|:-:|:-:|:-:|
Expand All @@ -270,7 +270,7 @@ string emailAddressOrErrorMessage = userResponse.Result.Match(
| [Get Team Membership](https://appwrite.io/docs/references/1.6.x/client-rest/teams#getMembership) | ✅ | ✅ |
| [Update Membership](https://appwrite.io/docs/references/1.6.x/client-rest/teams#updateMembership) | ✅ | ✅ |
| [Delete Team Membership](https://appwrite.io/docs/references/1.6.x/client-rest/teams#deleteMembership) | ✅ | ✅ |
| [Update Team Membership Status](https://appwrite.io/docs/references/1.6.x/client-rest/teams#updateMembershipStatus) | ✅ | |
| [Update Team Membership Status](https://appwrite.io/docs/references/1.6.x/client-rest/teams#updateMembershipStatus) | ✅ | |
| [Get Team Memberships](https://appwrite.io/docs/references/1.6.x/client-rest/teams#getPrefs) | ✅ | ✅ |
| [Update Preferences](https://appwrite.io/docs/references/1.6.x/client-rest/teams#updatePrefs) | ✅ | ✅ |

Expand Down
13 changes: 1 addition & 12 deletions src/PinguApps.Appwrite.Server/Clients/ITeamsClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using PinguApps.Appwrite.Shared;
using PinguApps.Appwrite.Shared.Requests.Teams;
Expand Down Expand Up @@ -96,16 +95,6 @@ public interface ITeamsClient
/// <returns>The membership</returns>
Task<AppwriteResult<Membership>> UpdateMembership(UpdateMembershipRequest request);

/// <summary>
/// <para>Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.</para>
/// <para>If the request is successful, a session for the user is automatically created.</para>
/// <para><see href="https://appwrite.io/docs/references/1.6.x/server-rest/teams#updateMembershipStatus">Appwrite Docs</see></para>
/// </summary>
/// <param name="request">The request content</param>
/// <returns>The membership</returns>
[Obsolete("This method on the server SDK currently will not work. You can track this bug on the Appwrite Github: https://github.com/appwrite/appwrite/issues/8828", false)]
Task<AppwriteResult<Membership>> UpdateTeamMembershipStatus(UpdateTeamMembershipStatusRequest request);

/// <summary>
/// Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in <see href="https://appwrite.io/docs/references/cloud/client-web/account#getPrefs">user preferences</see>.
/// <para><see href="https://appwrite.io/docs/references/1.6.x/server-rest/teams#getPrefs">Appwrite Docs</see></para>
Expand Down
17 changes: 0 additions & 17 deletions src/PinguApps.Appwrite.Server/Clients/TeamsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,23 +194,6 @@ public async Task<AppwriteResult<Membership>> UpdateMembership(UpdateMembershipR
}
}

/// <inheritdoc/>
public async Task<AppwriteResult<Membership>> UpdateTeamMembershipStatus(UpdateTeamMembershipStatusRequest request)
{
try
{
request.Validate(true);

var result = await _teamsApi.UpdateTeamMembershipStatus(request.TeamId, request.MembershipId, request);

return result.GetApiResponse();
}
catch (Exception e)
{
return e.GetExceptionResponse<Membership>();
}
}

/// <inheritdoc/>
public async Task<AppwriteResult<IReadOnlyDictionary<string, string>>> GetTeamPreferences(GetTeamPreferencesRequest request)
{
Expand Down

This file was deleted.