|
@@ -43,7 +43,10 @@ class CalendarHandler {
|
|
|
await supabase.rpc('get_crew_roster', params: {'_tlc': username});
|
|
await supabase.rpc('get_crew_roster', params: {'_tlc': username});
|
|
|
|
|
|
|
|
// Handle the response
|
|
// Handle the response
|
|
|
- print('TLC: $username ... EVENTS: ${rosterlist.length}');
|
|
|
|
|
|
|
+ final requester =
|
|
|
|
|
+ licences.firstWhere((e) => e['tlc'] == username, orElse: () => {});
|
|
|
|
|
+ print(
|
|
|
|
|
+ 'TLC: $username ... EVENTS: ${rosterlist.length} ... Name: ${requester['lname']}, ${requester['fname']}');
|
|
|
|
|
|
|
|
// Create an iCalendar object
|
|
// Create an iCalendar object
|
|
|
final ical = ICalendar();
|
|
final ical = ICalendar();
|
|
@@ -220,6 +223,9 @@ $crewlistdisplay
|
|
|
|
|
|
|
|
(String, String)? _getBasicAuthCredentials(Request request) {
|
|
(String, String)? _getBasicAuthCredentials(Request request) {
|
|
|
// Get Authorization header
|
|
// Get Authorization header
|
|
|
|
|
+ if (!request.headers.containsKey('authorization')) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
String authHeader = request.headers['authorization'] ?? "";
|
|
String authHeader = request.headers['authorization'] ?? "";
|
|
|
if (!authHeader.startsWith('Basic ')) {
|
|
if (!authHeader.startsWith('Basic ')) {
|
|
|
return null;
|
|
return null;
|