Skip to content

Commit 754ddf0

Browse files
authored
[compass_app/server] Misc consistency improvements (#2539)
1 parent c3c93a8 commit 754ddf0

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

compass_app/server/lib/routes/booking.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import '../model/booking/booking.dart';
2222
class BookingApi {
2323
BookingApi() {
2424
// Create a default booking
25-
var destination = Assets.destinations.first;
25+
final destination = Assets.destinations.first;
2626
final activitiesRef = Assets.activities
2727
.where((activity) => activity.destinationRef == destination.ref)
2828
.map((activity) => activity.ref)

compass_app/server/lib/routes/login.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
import 'dart:convert';
66

7-
import 'package:compass_server/config/constants.dart';
87
import 'package:shelf/shelf.dart';
98
import 'package:shelf_router/shelf_router.dart';
109

10+
import '../config/constants.dart';
1111
import '../model/login_request/login_request.dart';
1212
import '../model/login_response/login_response.dart';
1313

compass_app/server/lib/routes/user.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
import 'dart:convert';
66

7-
import 'package:compass_server/config/constants.dart';
87
import 'package:shelf/shelf.dart';
98
import 'package:shelf_router/shelf_router.dart';
109

10+
import '../config/constants.dart';
11+
1112
/// Implements a simple user API.
1213
///
1314
/// This API only returns a hardcoded user for demonstration purposes.

compass_app/server/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616

1717
dev_dependencies:
1818
http: ^1.1.0
19-
lints: ^3.0.0
19+
lints: ^5.0.0
2020
test: ^1.24.0
2121
build_runner: ^2.4.11
2222
freezed: ^2.5.7

compass_app/server/test/server_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void main() {
2121
final host = 'http://127.0.0.1:$port';
2222
late Process p;
2323

24-
var headers = {
24+
final headers = {
2525
'Authorization': 'Bearer ${Constants.token}',
2626
};
2727

@@ -116,7 +116,7 @@ void main() {
116116
headers: headers,
117117
body: jsonEncode(
118118
Booking(
119-
name: "DESTINATION, CONTINENT",
119+
name: 'DESTINATION, CONTINENT',
120120
startDate: DateTime(2024, 1, 1),
121121
endDate: DateTime(2024, 2, 2),
122122
destinationRef: 'REF',
@@ -139,7 +139,7 @@ void main() {
139139
headers: headers,
140140
body: jsonEncode(
141141
Booking(
142-
name: "DESTINATION, CONTINENT",
142+
name: 'DESTINATION, CONTINENT',
143143
startDate: DateTime(2024, 1, 1),
144144
endDate: DateTime(2024, 2, 2),
145145
destinationRef: 'REF',

0 commit comments

Comments
 (0)