diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2024-04-05 18:58:32 +0200 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2024-04-05 18:58:32 +0200 |
commit | 37b97d65c0a5262539a5de560e911048166b8bba (patch) | |
tree | f704a9c703b0ec47122a460576e151e0cb06fdc6 /Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs | |
parent | Fix merge conficts between machines (diff) | |
download | LibMatrix-37b97d65c0a5262539a5de560e911048166b8bba.tar.xz |
Fix homeserver resolution, rewrite homeserver initialisation, HSE work
Diffstat (limited to 'Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs')
-rw-r--r-- | Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs b/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs index ecbccd4..bdee7bc 100644 --- a/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs +++ b/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs @@ -14,12 +14,6 @@ public class FilterController(ILogger<FilterController> logger, TokenService tok [HttpPost("user/{mxid}/filter")] public async Task<object> CreateFilter(string mxid, [FromBody] SyncFilter filter) { var token = tokenService.GetAccessToken(HttpContext); - if (token is null) - throw new MatrixException() { - ErrorCode = "M_UNAUTHORIZED", - Error = "No token passed." - }; - var user = await userStore.GetUserByToken(token, false); if (user is null) throw new MatrixException() { @@ -36,12 +30,6 @@ public class FilterController(ILogger<FilterController> logger, TokenService tok [HttpGet("user/{mxid}/filter/{filterId}")] public async Task<SyncFilter> GetFilter(string mxid, string filterId) { var token = tokenService.GetAccessToken(HttpContext); - if (token is null) - throw new MatrixException() { - ErrorCode = "M_UNAUTHORIZED", - Error = "No token passed." - }; - var user = await userStore.GetUserByToken(token, false); if (user is null) throw new MatrixException() { |