Handle 409/410 when confirming username

This commit is contained in:
Fedor Indutny 2023-02-14 09:39:47 -08:00 committed by GitHub
parent 10885e5d3f
commit 486ada8b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 106 additions and 15 deletions

View file

@ -12,6 +12,11 @@ export enum ReserveUsernameError {
Conflict = 'Conflict',
}
export enum ConfirmUsernameResult {
Ok = 'Ok',
ConflictOrGone = 'ConflictOrGone',
}
export function getUsernameFromSearch(searchTerm: string): string | undefined {
// Search term contains username if it:
// - Is a valid username with or without a discriminator