🐛 Fix realm view won't show channels

This commit is contained in:
2024-09-18 13:03:40 +08:00
parent 01aaa5455e
commit 6a0f42cdc9
2 changed files with 18 additions and 6 deletions

View File

@ -89,13 +89,13 @@ class ChannelProvider extends GetxController {
return resp;
}
Future<Response> listAvailableChannel({String realm = 'global'}) async {
Future<Response> listAvailableChannel({String scope = 'global'}) async {
final AuthProvider auth = Get.find();
if (auth.isAuthorized.isFalse) throw const UnauthorizedException();
final client = await auth.configureClient('messaging');
final resp = await client.get('/channels/$realm/me/available');
final resp = await client.get('/channels/$scope/me/available');
if (resp.statusCode != 200) {
throw RequestException(resp);
}