Skip to content

Commit

Permalink
Added endpoint so a user can clean up their own account
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanratcliffe committed Apr 30, 2024
1 parent 15c18e9 commit 09daf16
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ service AdminService {
// Get the details of a given account
rpc GetAccount(AdminGetAccountRequest) returns (GetAccountResponse);
// Deletes an account
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);
rpc DeleteAccount(AdminDeleteAccountRequest) returns (AdminDeleteAccountResponse);

// Lists all sources within the closen account
rpc ListSources(AdminListSourcesRequest) returns (ListSourcesResponse);
Expand Down Expand Up @@ -77,11 +77,11 @@ message AdminGetAccountRequest {
string name = 1;
}

message DeleteAccountRequest {
message AdminDeleteAccountRequest {
// The name of the account to delete
string name = 1;
}
message DeleteAccountResponse {}
message AdminDeleteAccountResponse {}

message AdminListSourcesRequest {
string account = 1;
Expand Down Expand Up @@ -118,6 +118,8 @@ message AdminCreateTokenRequest {
service ManagementService {
// Get the details of the account that this user belongs to
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
// Deletes the user's account
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);

// Lists all sources within the user's account
rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse);
Expand Down Expand Up @@ -215,6 +217,13 @@ message GetAccountResponse {
Account account = 1;
}

message DeleteAccountRequest {
// Set to true to confirm that the user is sure they want to delete their
// account. This is to prevent accidental deletions
bool iAmSure = 1;
}
message DeleteAccountResponse {}

message ListSourcesRequest {}
message ListSourcesResponse {
repeated Source Sources = 1;
Expand Down

0 comments on commit 09daf16

Please sign in to comment.