File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
ui/src/app/pages/landing-page Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ public ICollection<Book> GetBooks()
3636 private ICollection < Book > LoadBooks ( )
3737 {
3838 // try and load from the book JSON data source (it will be readonly until we have a database backing the service).
39- var path = Environment . GetEnvironmentVariable ( "HOME" ) + @"\site\wwwroot\books.json" ;
39+ // locally, we can force the location of the file path using `ForceBooksFilePath` in `local.settings.json`.
40+ // when running in a Function app, use the recommended path.
41+ var path = Environment . GetEnvironmentVariable ( "ForceBooksFilePath" ) ??
42+ Environment . GetEnvironmentVariable ( "HOME" ) + @"\site\wwwroot\books.json" ;
4043 var books = JsonSerializer
4144 . Deserialize < ICollection < Book > > ( File . ReadAllText ( path ) ) ?? new List < Book > ( ) ;
4245
Original file line number Diff line number Diff line change 22 < p-table
33 #libraryTable
44 [globalFilterFields] ="['title', 'author', 'shelfLocation'] "
5- [value] ="library().books ?? [] "
5+ [value] ="library().books "
66 class ="w-full "
77 dataKey ="title ">
88 < ng-template #caption >
You can’t perform that action at this time.
0 commit comments