Skip to content

Commit

Permalink
fix params default values
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Jun 3, 2021
1 parent 6296196 commit 67457d5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/services/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ class Database extends Service {
/// of the project's documents. [Learn more about different API
/// modes](/docs/admin).
///
Future<Response> listDocuments({required String collectionId, List? filters, int? limit, int? offset, String? orderField, OrderType orderType = OrderType.asc, String? orderCast, String? search}) {
Future<Response> listDocuments({required String collectionId, List? filters, int? limit, int? offset, String? orderField, OrderType? orderType, String? orderCast, String? search}) {
final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);

final Map<String, dynamic> params = {
'filters': filters,
'limit': limit,
'offset': offset,
'orderField': orderField,
'orderType': orderType.name(),
'orderType': orderType?.name(),
'orderCast': orderCast,
'search': search,
};
Expand Down
4 changes: 2 additions & 2 deletions lib/services/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class Functions extends Service {
/// return a list of all of the project's executions. [Learn more about
/// different API modes](/docs/admin).
///
Future<Response> listExecutions({required String functionId, String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
Future<Response> listExecutions({required String functionId, String? search, int? limit, int? offset, OrderType? orderType}) {
final String path = '/functions/{functionId}/executions'.replaceAll(RegExp('{functionId}'), functionId);

final Map<String, dynamic> params = {
'search': search,
'limit': limit,
'offset': offset,
'orderType': orderType.name(),
'orderType': orderType?.name(),
};

final Map<String, String> headers = {
Expand Down
4 changes: 2 additions & 2 deletions lib/services/storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ class Storage extends Service {
/// your results. On admin mode, this endpoint will return a list of all of the
/// project's files. [Learn more about different API modes](/docs/admin).
///
Future<Response> listFiles({String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
Future<Response> listFiles({String? search, int? limit, int? offset, OrderType? orderType}) {
final String path = '/storage/files';

final Map<String, dynamic> params = {
'search': search,
'limit': limit,
'offset': offset,
'orderType': orderType.name(),
'orderType': orderType?.name(),
};

final Map<String, String> headers = {
Expand Down
8 changes: 4 additions & 4 deletions lib/services/teams.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class Teams extends Service {
/// of the project's teams. [Learn more about different API
/// modes](/docs/admin).
///
Future<Response> list({String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
Future<Response> list({String? search, int? limit, int? offset, OrderType? orderType}) {
final String path = '/teams';

final Map<String, dynamic> params = {
'search': search,
'limit': limit,
'offset': offset,
'orderType': orderType.name(),
'orderType': orderType?.name(),
};

final Map<String, String> headers = {
Expand Down Expand Up @@ -110,14 +110,14 @@ class Teams extends Service {
/// Get a team members by the team unique ID. All team members have read access
/// for this list of resources.
///
Future<Response> getMemberships({required String teamId, String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
Future<Response> getMemberships({required String teamId, String? search, int? limit, int? offset, OrderType? orderType}) {
final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);

final Map<String, dynamic> params = {
'search': search,
'limit': limit,
'offset': offset,
'orderType': orderType.name(),
'orderType': orderType?.name(),
};

final Map<String, String> headers = {
Expand Down

0 comments on commit 67457d5

Please sign in to comment.