[Flutter] Force a username before subscribing
This commit is contained in:
@@ -205,7 +205,7 @@ class APIClient {
|
||||
fn: User.fromJson,
|
||||
authToken: auth.getToken(),
|
||||
query: {
|
||||
'confirm': ['true']
|
||||
'confirm': ['true'],
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -230,7 +230,7 @@ class APIClient {
|
||||
static Future<Client> updateClient(TokenSource auth, String clientID, {String? fcmToken, String? agentModel, String? name, String? agentVersion}) async {
|
||||
return await _request(
|
||||
name: 'updateClient',
|
||||
method: 'PUT',
|
||||
method: 'PATCH',
|
||||
relURL: 'users/${auth.getUserID()}/clients/$clientID',
|
||||
jsonBody: {
|
||||
if (fcmToken != null) 'fcm_token': fcmToken,
|
||||
@@ -259,7 +259,7 @@ class APIClient {
|
||||
method: 'GET',
|
||||
relURL: 'users/${auth.getUserID()}/channels',
|
||||
query: {
|
||||
'selector': [sel.apiKey]
|
||||
'selector': [sel.apiKey],
|
||||
},
|
||||
fn: (json) => ChannelWithSubscription.fromJsonArray(json['channels'] as List<dynamic>),
|
||||
authToken: auth.getToken(),
|
||||
|
||||
Reference in New Issue
Block a user