Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Cleanup unused ApiError codes, update EF docs
Leendert de Borst9a453a1fab65
diff --git a/apps/browser-extension/src/i18n/locales/en.json b/apps/browser-extension/src/i18n/locales/en.jsonindex d16a3c9d8..02e3a95c0 100644--- a/apps/browser-extension/src/i18n/locales/en.json+++ b/apps/browser-extension/src/i18n/locales/en.json@@ -110,7 +110,6 @@"INVALID_RECOVERY_CODE": "Invalid recovery code. Please try again.","REFRESH_TOKEN_REQUIRED": "Refresh token is required.","INVALID_REFRESH_TOKEN": "Invalid refresh token.",- "REFRESH_TOKEN_REVOKED_SUCCESSFULLY": "Refresh token revoked successfully.","PUBLIC_REGISTRATION_DISABLED": "New account registration is currently disabled on this server. Please contact the administrator.","USERNAME_REQUIRED": "Username is required.","USERNAME_ALREADY_IN_USE": "Username is already in use.",diff --git a/apps/mobile-app/i18n/locales/en.json b/apps/mobile-app/i18n/locales/en.jsonindex ee28b09ba..ce58baca9 100644--- a/apps/mobile-app/i18n/locales/en.json+++ b/apps/mobile-app/i18n/locales/en.json@@ -443,7 +443,6 @@"INVALID_RECOVERY_CODE": "Invalid recovery code. Please try again.","REFRESH_TOKEN_REQUIRED": "Refresh token is required.","INVALID_REFRESH_TOKEN": "Invalid refresh token.",- "REFRESH_TOKEN_REVOKED_SUCCESSFULLY": "Refresh token revoked successfully.","PUBLIC_REGISTRATION_DISABLED": "New account registration is currently disabled on this server. Please contact the administrator.","USERNAME_REQUIRED": "Username is required.","USERNAME_ALREADY_IN_USE": "Username is already in use.",diff --git a/apps/server/AliasVault.Api/Controllers/AuthController.cs b/apps/server/AliasVault.Api/Controllers/AuthController.csindex 08c93eff0..3be6e48f4 100644--- a/apps/server/AliasVault.Api/Controllers/AuthController.cs+++ b/apps/server/AliasVault.Api/Controllers/AuthController.cs@@ -370,7 +370,7 @@ public class AuthController(IAliasServerDbContextFactory dbContextFactory, UserMawait context.SaveChangesAsync();await authLoggingService.LogAuthEventSuccessAsync(user.UserName!, AuthEventType.Logout);- return Ok(ApiErrorCodeHelper.CreateErrorResponse(ApiErrorCode.REFRESH_TOKEN_REVOKED_SUCCESSFULLY, 200));+ return Ok();}/// <summary>diff --git a/apps/server/AliasVault.Client/Resources/ApiErrors.en.resx b/apps/server/AliasVault.Client/Resources/ApiErrors.en.resxindex c76847bd9..74a385a6d 100644--- a/apps/server/AliasVault.Client/Resources/ApiErrors.en.resx+++ b/apps/server/AliasVault.Client/Resources/ApiErrors.en.resx@@ -125,9 +125,6 @@<data name="INVALID_REFRESH_TOKEN" xml:space="preserve"><value>Invalid refresh token</value></data>- <data name="REFRESH_TOKEN_REVOKED_SUCCESSFULLY" xml:space="preserve">- <value>Refresh token revoked successfully</value>- </data><data name="PUBLIC_REGISTRATION_DISABLED" xml:space="preserve"><value>New account registration is currently disabled on this server. Please contact the administrator.</value></data>@@ -170,9 +167,6 @@<data name="PENDING_MIGRATIONS" xml:space="preserve"><value>There are pending migrations. Please run 'dotnet ef database update' to apply them.</value></data>- <data name="SYSTEM_OK" xml:space="preserve">- <value>OK</value>- </data><data name="INTERNAL_SERVER_ERROR" xml:space="preserve"><value>Internal server error</value></data>diff --git a/apps/server/Databases/AliasServerDb/appsettings.json b/apps/server/Databases/AliasServerDb/appsettings.jsonindex 57afecc73..e0260c1f0 100644--- a/apps/server/Databases/AliasServerDb/appsettings.json+++ b/apps/server/Databases/AliasServerDb/appsettings.json@@ -7,6 +7,6 @@},"AllowedHosts": "*","ConnectionStrings": {- "AliasServerDbContext": "Data Source=../../../database/AliasServerDb.sqlite"+ "AliasServerDbContext": "Host=localhost;Port=5433;Database=aliasvault;Username=aliasvault;Password=password;Maximum Pool Size=80;Minimum Pool Size=5"}}diff --git a/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs b/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.csindex b416da015..2b92b1e40 100644--- a/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs+++ b/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs@@ -34,11 +34,6 @@ public enum ApiErrorCode/// </summary>INVALID_REFRESH_TOKEN,- /// <summary>- /// Refresh token was successfully revoked.- /// </summary>- REFRESH_TOKEN_REVOKED_SUCCESSFULLY,-/// <summary>/// Public registration is disabled on this server./// </summary>@@ -109,11 +104,6 @@ public enum ApiErrorCode/// </summary>PENDING_MIGRATIONS,- /// <summary>- /// System is OK.- /// </summary>- SYSTEM_OK,-/// <summary>/// Internal server error occurred./// </summary>diff --git a/docs/misc/dev/upgrade-ef-server-model.md b/docs/misc/dev/upgrade-ef-server-model.mdindex 712a753bc..3847bf384 100644--- a/docs/misc/dev/upgrade-ef-server-model.md+++ b/docs/misc/dev/upgrade-ef-server-model.md@@ -8,8 +8,32 @@ nav_order: 6# Upgrade the AliasServerDb EF model+## Create new migrationThe below command allows you to create a new EF migration based on the existing database structure as defined in the EF mode classes.```bash-dotnet ef migrations add InitialMigration --output-dir Migrations/PostgresqlMigrations+cd apps/server/Databases/AliasServerDb+dotnet ef migrations add NewMigrationDescription+```++When (re)starting the API, any new migrations are automatically applied to the database.++## Remove migration+In order to remove one or more added migrations, run the following command:++```bash+dotnet ef migrations remove+```++> Note: if you get an error stating the migration has already been applied, first rollback the database following the instructions below.++# Rollback AliasServerDb database to previous migration++To rollback the database and undo one or more applied migrations, run the command below and replace the `ChangeDeviceIdentifierToTextfield` with the name of the target migration to revert back to.++So e.g. if target migration is called: `20250922173722_ChangeDeviceIdentifierToTextField.cs` then run this command:++```bash+cd apps/server/Databases/AliasServerDb+dotnet ef database update ChangeDeviceIdentifierToTextField```