Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compass_app/server/lib/routes/booking.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import '../model/booking/booking.dart';
class BookingApi {
BookingApi() {
// Create a default booking
var destination = Assets.destinations.first;
final destination = Assets.destinations.first;
final activitiesRef = Assets.activities
.where((activity) => activity.destinationRef == destination.ref)
.map((activity) => activity.ref)
Expand Down
2 changes: 1 addition & 1 deletion compass_app/server/lib/routes/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import 'dart:convert';

import 'package:compass_server/config/constants.dart';
import 'package:shelf/shelf.dart';
import 'package:shelf_router/shelf_router.dart';

import '../config/constants.dart';
import '../model/login_request/login_request.dart';
import '../model/login_response/login_response.dart';

Expand Down
3 changes: 2 additions & 1 deletion compass_app/server/lib/routes/user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import 'dart:convert';

import 'package:compass_server/config/constants.dart';
import 'package:shelf/shelf.dart';
import 'package:shelf_router/shelf_router.dart';

import '../config/constants.dart';

/// Implements a simple user API.
///
/// This API only returns a hardcoded user for demonstration purposes.
Expand Down
2 changes: 1 addition & 1 deletion compass_app/server/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

dev_dependencies:
http: ^1.1.0
lints: ^3.0.0
lints: ^5.0.0
test: ^1.24.0
build_runner: ^2.4.11
freezed: ^2.5.7
Expand Down
6 changes: 3 additions & 3 deletions compass_app/server/test/server_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void main() {
final host = 'http://127.0.0.1:$port';
late Process p;

var headers = {
final headers = {
'Authorization': 'Bearer ${Constants.token}',
};

Expand Down Expand Up @@ -116,7 +116,7 @@ void main() {
headers: headers,
body: jsonEncode(
Booking(
name: "DESTINATION, CONTINENT",
name: 'DESTINATION, CONTINENT',
startDate: DateTime(2024, 1, 1),
endDate: DateTime(2024, 2, 2),
destinationRef: 'REF',
Expand All @@ -139,7 +139,7 @@ void main() {
headers: headers,
body: jsonEncode(
Booking(
name: "DESTINATION, CONTINENT",
name: 'DESTINATION, CONTINENT',
startDate: DateTime(2024, 1, 1),
endDate: DateTime(2024, 2, 2),
destinationRef: 'REF',
Expand Down
Loading