Skip to content

Commit

Permalink
Fix image publishing, fix stack trace logging
Browse files Browse the repository at this point in the history
  • Loading branch information
RCgmbh committed Jan 28, 2025
1 parent e38c08f commit 0e9179a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions PiLotAPICore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ private static void SetupLogger() {
LogLevels logLevel = LogLevels.ERROR;
Enum.TryParse<LogLevels>(configLogLevel, out logLevel);
String logfilePath = ConfigurationManager.AppSettings["logfilePath"];
String logStackTrace = ConfigurationManager.AppSettings["logStackTrace"];
Logger.SetupLogging(logfilePath, logLevel, logStackTrace == Boolean.TrueString);
Logger.Log("PiLot.API is starting", LogLevels.INFO);
Boolean.TryParse(ConfigurationManager.AppSettings["logStackTrace"], out Boolean logStackTrace);
Logger.SetupLogging(logfilePath, logLevel, logStackTrace);
Logger.Log($"PiLot.API is starting. LogLevel: {logLevel}, log stack trace: {logStackTrace}", LogLevels.INFO);
}
}
}
2 changes: 1 addition & 1 deletion PiLotAPIProxy/PhotosProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public PhotosProxy(String pApiUrl, LoginHelper pLoginHelper) {
/// <param name="pDate">The date for which we want the photos</param>
/// <returns>An image collection or null</returns>
public async Task<ProxyResult<ImageCollection>> GetDailyPhotos(Date pDate) {
String url = ($"{this.apiControllerUrl}?year={pDate.Year}&month={pDate.Month}&day={pDate.Day}");
String url = ($"{this.apiControllerUrl}/{pDate.Year}/{pDate.Month}/{pDate.Day}");
return await this.httpClient.GetAsync<ImageCollection>(url);
}

Expand Down
2 changes: 1 addition & 1 deletion PiLotWeb/js/Model/Logbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ PiLot.Model.Logbook = (function () {
}
result.data.tracks = tracks;
result.data.logbookDay = await PiLot.Model.Logbook.LogbookDay.fromDataAsync(result.data.logbookDay);
result.data.photoInfos = new RC.ImageGallery.ImageCollection(result.data.photoInfos.rootUrl, result.data.photoInfos.zoomFolders, result.data.photoInfos.imageNames);
result.data.photoInfos = new ImageCollection(result.data.photoInfos.rootUrl, result.data.photoInfos.name, result.data.photoInfos.zoomFolders, result.data.photoInfos.imageNames);
}
return result;
};
Expand Down

0 comments on commit 0e9179a

Please sign in to comment.