Fixed endpoints for /users and /messages.

This commit is contained in:
2025-07-05 10:22:45 +02:00
parent 070ccd79fd
commit 468d029ed5
11 changed files with 303 additions and 8 deletions

View File

@ -14,11 +14,11 @@ namespace MessengerBroker.Configuration.Parsers
if (type == MessengerApi.Configuration.Enums.PersistenceTypes.Sql)
{
return new SqlPersistenceConfiguration(config);
return new SqlPersistenceConfiguration(config.GetValue<string>(Constants.EnvironmentVariables.API_SQL_CONNECTIONSTRING));
}
else if (type == MessengerApi.Configuration.Enums.PersistenceTypes.PostgreSql)
{
return new NpgPersistenceConfiguration(config);
return new NpgPersistenceConfiguration(config.GetValue<string>(Constants.EnvironmentVariables.API_NPG_CONNECTIONSTRING));
}
throw new InvalidOperationException("Unrecognized persistence type.");