fixing getting room photos, reworking how routing works, added jotai for state management

This commit is contained in:
2022-03-27 22:48:06 -04:00
parent 6ced49f5cd
commit 02a9c6c99c
9 changed files with 5425 additions and 9914 deletions

View File

@@ -1,317 +1,176 @@
{"level":"debug","time":"2021-12-27T21:10:13-05:00","message":"Returning Locations: []"}
{"logtype":"webserver", "pid":"22376", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"info","time":"2021-12-27T21:12:14-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:12:14-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:12:14-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2021-12-27T21:12:18-05:00","message":"Adding new location to database: %!(EXTRA main.Location={0 Location1 ./app/photos/locations/Location1/Location1_cover.png [./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] [] Notes for my location!})"}
{"level":"debug","time":"2021-12-27T21:12:18-05:00","message":"Adding new location: {0 Location1 ./app/photos/locations/Location1/Location1_cover.png [./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] [] Notes for my location!}"}
{"logtype":"webserver", "pid":"3604", "requestid":"", "status":"200", "method":"POST", "path":"/api/locations/new"}
{"level":"debug","time":"2021-12-27T21:12:47-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"3604", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"info","time":"2021-12-27T21:13:38-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:13:38-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:13:38-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"debug","time":"2021-12-27T21:13:42-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2021-12-27T21:14:11-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2021-12-27T21:14:12-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"404", "method":"GET", "path":"/api/photos/locations/Location1/app/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2021-12-27T21:18:27-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"404", "method":"GET", "path":"/api/photos/locations/Location1/app/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2021-12-27T21:25:05-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"18424", "requestid":"", "status":"404", "method":"GET", "path":"/photos/locations/Location1/app/photos/locations/Location1/Location1_cover.png"}
{"level":"info","time":"2021-12-27T21:26:49-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:26:49-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:26:49-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2021-12-27T21:27:27-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:27:27-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:27:27-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2021-12-27T21:30:56-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:30:56-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:30:56-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2021-12-27T21:33:30-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:33:30-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:33:30-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2021-12-27T21:34:24-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:34:24-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:34:24-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"error","time":"2021-12-27T21:34:31-05:00","message":"Unable to fetch all rooms at location: field Location not found"}
{"level":"error","error":"field Location not found","time":"2021-12-27T21:34:31-05:00","message":"Unable to fetch location with id: 1"}
{"level":"info","time":"2021-12-27T21:34:31-05:00","message":"Deleting location from database: %!(EXTRA main.Location={0 [] [] })"}
{"level":"error","time":"2021-12-27T21:34:31-05:00","message":"Unable to delete location from database: {%!s(int=0) [] [] } error: not found "}
{"level":"error","error":"not found","time":"2021-12-27T21:34:31-05:00","message":"Unable to delete location with id: 1"}
{"logtype":"webserver", "pid":"20316", "requestid":"", "status":"200", "method":"DELETE", "path":"/api/locations/1"}
{"level":"info","time":"2021-12-27T21:34:47-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:34:47-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:34:47-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"debug","time":"2021-12-27T21:34:48-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"28720", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"error","time":"2021-12-27T21:35:02-05:00","message":"Unable to fetch all rooms at location: field Location not found"}
{"level":"error","error":"field Location not found","time":"2021-12-27T21:35:02-05:00","message":"Unable to fetch location with id: 1"}
{"level":"info","time":"2021-12-27T21:35:02-05:00","message":"Deleting location from database: %!(EXTRA main.Location={0 [] [] })"}
{"level":"error","time":"2021-12-27T21:35:02-05:00","message":"Unable to delete location from database: {%!s(int=0) [] [] } error: not found "}
{"level":"error","error":"not found","time":"2021-12-27T21:35:02-05:00","message":"Unable to delete location with id: 1"}
{"logtype":"webserver", "pid":"28720", "requestid":"", "status":"200", "method":"DELETE", "path":"/api/locations/1"}
{"level":"debug","time":"2021-12-27T21:35:06-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"28720", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"info","time":"2021-12-27T21:36:13-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:36:13-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:36:13-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"error","time":"2021-12-27T21:36:15-05:00","message":"Unable to fetch all rooms at location: field Location not found"}
{"level":"error","error":"field Location not found","time":"2021-12-27T21:36:15-05:00","message":"Unable to fetch location with id: 1"}
{"logtype":"webserver", "pid":"21240", "requestid":"", "status":"500", "method":"DELETE", "path":"/api/locations/1"}
{"level":"info","time":"2021-12-27T21:37:30-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:37:30-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:37:30-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"error","time":"2021-12-27T21:38:18-05:00","message":"Unable to fetch all rooms at location: field Location not found"}
{"logtype":"webserver", "pid":"20368", "requestid":"", "status":"500", "method":"GET", "path":"/api/locations/1"}
{"level":"debug","time":"2021-12-27T21:38:46-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"20368", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"info","time":"2021-12-27T21:40:29-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2021-12-27T21:40:29-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2021-12-27T21:40:29-05:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"20308", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations/1"}
{"level":"info","time":"2022-01-08T21:51:07-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T21:51:07-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T21:51:07-05:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"22268", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T21:51:34-05:00","message":"Returning Locations: [{ID:1 Name:Location1 Description: CoverPhoto:./app/photos/locations/Location1/Location1_cover.png Photos:[./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22268", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22268", "requestid":"", "status":"404", "method":"GET", "path":"/photos/locations/Location1/app/photos/locations/Location1/Location1_cover.png"}
{"level":"info","time":"2022-01-08T21:53:50-05:00","message":"Deleting location from database: %!(EXTRA main.Location={1 Location1 ./app/photos/locations/Location1/Location1_cover.png [./app/photos/locations/Location1/Location1_0.png ./app/photos/locations/Location1/Location1_1.png] [] Notes for my location!})"}
{"logtype":"webserver", "pid":"22268", "requestid":"", "status":"200", "method":"DELETE", "path":"/api/locations/1"}
{"level":"info","time":"2022-01-08T21:58:01-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T21:58:01-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T21:58:01-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-08T21:58:07-05:00","message":"Adding new location to database: %!(EXTRA main.Location={0 Location1 Location1/Location1_cover.png [Location1/Location1_0.png Location1/Location1_1.png] [] Notes for my location!})"}
{"level":"debug","time":"2022-01-08T21:58:07-05:00","message":"Adding new location: {0 Location1 Location1/Location1_cover.png [Location1/Location1_0.png Location1/Location1_1.png] [] Notes for my location!}"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"200", "method":"POST", "path":"/api/locations/new"}
{"level":"error","time":"2022-01-08T21:58:10-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"500", "method":"GET", "path":"/api/locations/1"}
{"level":"debug","time":"2022-01-08T21:58:18-05:00","message":"Returning Locations: [{ID:2 Name:Location1 Description: CoverPhoto:Location1/Location1_cover.png Photos:[Location1/Location1_0.png Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-01-08T21:58:30-05:00","message":"Returning Locations: [{ID:2 Name:Location1 Description: CoverPhoto:Location1/Location1_cover.png Photos:[Location1/Location1_0.png Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T21:58:31-05:00","message":"Returning Locations: [{ID:2 Name:Location1 Description: CoverPhoto:Location1/Location1_cover.png Photos:[Location1/Location1_0.png Location1/Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"404", "method":"GET", "path":"/photos/locations/Location1/Location1/Location1_cover.png"}
{"level":"info","time":"2022-01-08T22:00:24-05:00","message":"Deleting location from database: %!(EXTRA main.Location={2 Location1 Location1/Location1_cover.png [Location1/Location1_0.png Location1/Location1_1.png] [] Notes for my location!})"}
{"logtype":"webserver", "pid":"7868", "requestid":"", "status":"200", "method":"DELETE", "path":"/api/locations/2"}
{"level":"info","time":"2022-01-08T22:00:30-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T22:00:30-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T22:00:30-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-08T22:00:34-05:00","message":"Adding new location to database: %!(EXTRA main.Location={0 Location1 Location1_cover.png [Location1_0.png Location1_1.png] [] Notes for my location!})"}
{"level":"debug","time":"2022-01-08T22:00:34-05:00","message":"Adding new location: {0 Location1 Location1_cover.png [Location1_0.png Location1_1.png] [] Notes for my location!}"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"POST", "path":"/api/locations/new"}
{"level":"debug","time":"2022-01-08T22:00:39-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-01-08T22:00:46-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T22:00:47-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32476", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations/3"}
{"level":"info","time":"2022-01-08T22:09:01-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T22:09:01-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T22:09:01-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"debug","time":"2022-01-08T22:09:09-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"level":"info","time":"2022-01-08T22:10:08-05:00","message":"Adding new location to database: %!(EXTRA main.Location={0 Location4 Location4_cover.png [Location4_0.png Location4_1.png] [] Notes for my location!})"}
{"level":"debug","time":"2022-01-08T22:10:08-05:00","message":"Adding new location: {0 Location4 Location4_cover.png [Location4_0.png Location4_1.png] [] Notes for my location!}"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"POST", "path":"/api/locations/new"}
{"level":"debug","time":"2022-01-08T22:10:11-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-01-08T22:10:15-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T22:10:17-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/photos/locations/Location4/Location4_cover.png"}
{"level":"debug","time":"2022-01-08T22:17:30-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/undefined"}
{"level":"error","time":"2022-01-08T22:18:34-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/1"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T22:27:19-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location4/Location4_cover.png"}
{"level":"error","time":"2022-01-08T22:27:23-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"level":"error","time":"2022-01-08T22:27:58-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"level":"debug","time":"2022-01-08T22:28:00-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:28:34-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:28:44-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"404", "method":"GET", "path":"/api/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:29:49-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"404", "method":"GET", "path":"/api/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:31:07-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:32:40-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:33:04-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:34:50-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-08T22:35:43-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T22:36:03-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location4/Location4_cover.png"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"level":"error","time":"2022-01-08T22:36:04-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"level":"error","time":"2022-01-08T22:36:39-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-01-08T22:36:46-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"error","time":"2022-01-08T22:36:49-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"level":"error","time":"2022-01-08T22:37:08-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"level":"error","time":"2022-01-08T22:37:13-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/1"}
{"level":"error","time":"2022-01-08T22:37:36-05:00","message":"Unable to fetch all rooms at location: not found"}
{"logtype":"webserver", "pid":"22076", "requestid":"", "status":"500", "method":"GET", "path":"/api/rooms/3"}
{"level":"info","time":"2022-01-08T22:43:16-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T22:43:16-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T22:43:16-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-08T22:48:14-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T22:48:14-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T22:48:14-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-08T22:49:52-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T22:49:52-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T22:49:52-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-08T22:50:04-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-08T22:50:04-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-08T22:50:04-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T10:47:35-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T10:47:35-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T10:47:35-05:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"20004", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-01-09T10:48:38-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T10:48:38-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T10:48:38-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T10:52:16-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T10:52:16-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T10:52:16-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T11:32:12-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T11:32:12-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T11:32:12-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T11:41:54-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T11:41:54-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T11:41:54-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T11:42:49-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T11:42:49-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T11:42:49-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:29:36-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:29:36-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:29:36-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:30:55-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:30:55-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:30:55-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"debug","time":"2022-01-09T12:31:01-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"22320", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"info","time":"2022-01-09T12:34:38-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:34:38-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:34:38-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:35:29-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:35:29-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:35:29-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:35:33-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:35:33-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:35:33-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:35:49-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:35:49-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:35:49-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:36:10-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:36:10-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:36:10-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:37:37-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:37:37-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:37:37-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:38:28-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:38:28-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:38:28-05:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"23980", "requestid":"", "status":"500", "method":"POST", "path":"/api/rooms/3/new"}
{"level":"info","time":"2022-01-09T12:39:35-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:39:35-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:39:35-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:40:20-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:40:20-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:40:20-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:40:33-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:40:33-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:40:33-05:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"38540", "requestid":"", "status":"500", "method":"POST", "path":"/api/rooms/3/new"}
{"level":"info","time":"2022-01-09T12:42:04-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:42:04-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:42:04-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:44:05-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:44:05-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:44:05-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:44:07-05:00","message":"Adding new room to location: {%!s(int=0) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3)}"}
{"level":"debug","time":"2022-01-09T12:44:07-05:00","message":"Adding new Room: {0 Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] 3}"}
{"logtype":"webserver", "pid":"22756", "requestid":"", "status":"200", "method":"POST", "path":"/api/rooms/3/new"}
{"level":"info","time":"2022-01-09T12:44:15-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"22756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"level":"info","time":"2022-01-09T12:48:32-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:48:32-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:48:32-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:49:26-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:49:26-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:49:26-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:50:22-05:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-01-09T12:50:22-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-01-09T12:50:22-05:00","message":"Database and Config loaded, starting webserver..."}
{"level":"info","time":"2022-01-09T12:50:59-05:00","message":"Fetching room with id: 1"}
{"level":"info","time":"2022-01-09T12:50:59-05:00","message":"Deleting room from database: {%!s(int=1) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3) }"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"200", "method":"DELETE", "path":"/api/rooms/1"}
{"level":"info","time":"2022-01-09T12:51:03-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"level":"info","time":"2022-01-09T12:53:49-05:00","message":"Adding new room to location: {%!s(int=0) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3) Location1}"}
{"level":"debug","time":"2022-01-09T12:53:49-05:00","message":"Adding new Room: {0 Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] 3 Location1}"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"200", "method":"POST", "path":"/api/rooms/3/new"}
{"level":"info","time":"2022-01-09T12:54:00-05:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"level":"debug","time":"2022-01-09T12:54:45-05:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location4/Location4_cover.png"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"304", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"14596", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"logtype":"webserver", "pid":"21924", "requestid":"", "status":"403", "method":"GET", "path":"/"}
{"logtype":"webserver", "pid":"21924", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"logtype":"webserver", "pid":"21924", "requestid":"", "status":"404", "method":"GET", "path":"/locations"}
{"logtype":"webserver", "pid":"21924", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"logtype":"webserver", "pid":"21924", "requestid":"", "status":"404", "method":"GET", "path":"/hello"}
{"logtype":"webserver", "pid":"21924", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"level":"info","time":"2022-03-27T22:10:45-04:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-03-27T22:10:45-04:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-03-27T22:10:45-04:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"404", "method":"GET", "path":"/hello"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/static/js/main.3a6ff36e.js"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/static/js/main.3a6ff36e.js.map"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/manifest.json"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/logo192.png"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"level":"debug","time":"2022-03-27T22:11:16-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/photos/locations/Location1/Location1_cover.png"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/photos/locations/Location4/Location4_cover.png"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"200", "method":"GET", "path":"/favicon.ico"}
{"logtype":"webserver", "pid":"8976", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"info","time":"2022-03-27T22:11:41-04:00","message":"Configuration loaded successfully..."}
{"level":"debug","time":"2022-03-27T22:11:41-04:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationPhotoDir:./app/photos/locations/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
{"level":"info","time":"2022-03-27T22:11:41-04:00","message":"Database and Config loaded, starting webserver..."}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-03-27T22:12:06-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"info","time":"2022-03-27T22:12:40-04:00","message":"Adding new room to location: {%!s(int=0) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3) Location1}"}
{"level":"error","time":"2022-03-27T22:12:40-04:00","message":"Unable to add new room to database: {%!s(int=3) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3) Location1} error: already exists"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"500", "method":"POST", "path":"/api/rooms/3/new"}
{"level":"info","time":"2022-03-27T22:12:54-04:00","message":"Fetching room with id: 3"}
{"level":"error","time":"2022-03-27T22:12:54-04:00","message":"Unable to fetch room with id: 3 with error: not found"}
{"level":"error","error":"not found","time":"2022-03-27T22:12:54-04:00","message":"Unable to fetch room with id: 3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"500", "method":"DELETE", "path":"/api/rooms/3"}
{"level":"info","time":"2022-03-27T22:13:06-04:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"level":"info","time":"2022-03-27T22:13:14-04:00","message":"Fetching room with id: 2"}
{"level":"info","time":"2022-03-27T22:13:14-04:00","message":"Deleting room from database: {%!s(int=2) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3) Location1}"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"DELETE", "path":"/api/rooms/2"}
{"level":"info","time":"2022-03-27T22:13:48-04:00","message":"Adding new room to location: {%!s(int=0) Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] %!s(int=3) Location1}"}
{"level":"debug","time":"2022-03-27T22:13:48-04:00","message":"Adding new Room: {0 Kitchen Location1/Kitchen/Kitchen_cover.png [Location1/Kitchen/Kitchen_0.png] Notes For My Room! [] [] 3 Location1}"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"POST", "path":"/api/rooms/3/new"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"level":"debug","time":"2022-03-27T22:17:58-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:19:12-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:21:05-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:31:23-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:31:30-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"info","time":"2022-03-27T22:31:34-04:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"level":"info","time":"2022-03-27T22:32:04-04:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"level":"debug","time":"2022-03-27T22:32:09-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:33:44-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:34:04-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:35:14-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:35:16-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"level":"info","time":"2022-03-27T22:36:24-04:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:36:41-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:36:45-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:37:43-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:37:48-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:37:56-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:09-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:11-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:12-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:14-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:16-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:18-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:48-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:50-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:41:52-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:44:49-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"level":"debug","time":"2022-03-27T22:44:52-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/rooms/Kitchen/Location1/Kitchen/Kitchen_cover.png"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/Location1/Kitchen/Kitchen_cover.png"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"level":"info","time":"2022-03-27T22:46:25-04:00","message":"Getting all Rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"404", "method":"GET", "path":"/photos/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:46:37-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/photos/locations/Location1/Kitchen/Kitchen_cover.png"}
{"level":"debug","time":"2022-03-27T22:47:10-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"level":"debug","time":"2022-03-27T22:47:12-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"level":"debug","time":"2022-03-27T22:47:13-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}
{"level":"debug","time":"2022-03-27T22:47:19-04:00","message":"Returning Locations: [{ID:3 Name:Location1 Description: CoverPhoto:Location1_cover.png Photos:[Location1_0.png Location1_1.png] Rooms:[] Notes:Notes for my location!} {ID:4 Name:Location4 Description: CoverPhoto:Location4_cover.png Photos:[Location4_0.png Location4_1.png] Rooms:[] Notes:Notes for my location!}]"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
{"logtype":"webserver", "pid":"32756", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms/3"}

14743
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,25 +3,26 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@mantine/core": "^3.3.5",
"@mantine/dates": "^3.3.5",
"@mantine/dropzone": "^3.3.5",
"@mantine/hooks": "^3.3.5",
"@mantine/notifications": "^3.3.5",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@mantine/core": "^4.0.9",
"@mantine/dates": "^4.0.9",
"@mantine/dropzone": "^4.0.9",
"@mantine/hooks": "^4.0.9",
"@mantine/notifications": "^4.0.9",
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"base-64": "^1.0.0",
"dayjs": "^1.10.7",
"npm-check-updates": "^12.0.3",
"dayjs": "^1.11.0",
"jotai": "^1.6.1",
"npm-check-updates": "^12.5.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"react-jss": "^10.9.0",
"react-router": "^6.2.1",
"react-router-dom": "^6.2.1",
"react-scripts": "4.0.3",
"web-vitals": "^2.1.2"
"react-router": "^6.2.2",
"react-router-dom": "^6.2.2",
"react-scripts": "5.0.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",

View File

@@ -1,4 +1,5 @@
import React, {useState, useEffect, createContext} from 'react';
import React, {useState, useEffect } from 'react';
import { useAtom } from 'jotai';
import HomePage from './components/pages/HomePage';
import Locations from './components/pages/Locations';
import RoomsPage from './components/pages/RoomsPage';
@@ -9,23 +10,20 @@ import { useNotifications } from '@mantine/notifications';
import { backendAPI, defaultURLS } from './services/backend-api';
import { serverConfigAtom } from './state/main'
import SideBar from './components/SideBar';
import AppHeader from './components/AppHeader';
export const APIContext = createContext();
function App() {
// Main nav/sidebar appshell openend
const [shellOpened, setShellOpened] = useState(false)
const [isLoading, setIsLoading] = useState(true)
const [currentPage, setCurrentPage] = useState({"path": "home", "id": -1})
const [serverConfig, setServerConfig] = useState({})
const [, setServerConfig] = useAtom(serverConfigAtom)
const notifications = useNotifications();
const navigate = useNavigate();
@@ -80,11 +78,10 @@ function App() {
return (
<APIContext.Provider value={serverConfig}>
<AppShell
navbarOffsetBreakpoint="sm" // navbarOffsetBreakpoint controls when navbar should no longer be offset with padding-left
fixed // fixed prop on AppShell will be automatically added to Header and Navbar
navbar={<SideBar opened={shellOpened} setCurrentPage={setCurrentPage}/>}
navbar={<SideBar opened={shellOpened} />}
header={<AppHeader opened={shellOpened} setOpened={setShellOpened}/>}
>
<Routes>
@@ -94,8 +91,6 @@ function App() {
</Routes>
</AppShell>
</APIContext.Provider>
);
}

View File

@@ -1,4 +1,6 @@
import React, {useState } from 'react';
import { useAtom } from 'jotai';
import { activePageAtom } from '../state/main';
import { Navbar, Text, Group, ThemeIcon, Button, UnstyledButton } from '@mantine/core';
import { Link } from 'react-router-dom';
import { createStyles } from '@mantine/styles';
@@ -36,7 +38,7 @@ const useStyles = createStyles((theme) => ({
function SideBar(props) {
const { classes } = useStyles();
const [activePage, setActivePage] = useState("")
const [activePage, setActivePage] = useAtom(activePageAtom)
return (
@@ -59,7 +61,7 @@ function SideBar(props) {
</Group>
</UnstyledButton> */}
<UnstyledButton component={Link} to="/about" className={activePage === "rooms" ? classes.activeButton : classes.button} onClick={() => setActivePage("rooms")} >
<UnstyledButton component={Link} to="/rooms" className={activePage === "rooms" ? classes.activeButton : classes.button} onClick={() => setActivePage("rooms")} >
<Group>
<BsMap />
<Text>Rooms</Text>

View File

@@ -1,13 +1,15 @@
import React, {useState, useEffect, useContext, createContext} from 'react';
import APIContext from '../../App';
import { Text } from '@mantine/core'
import { useAtom } from 'jotai';
import { serverConfigAtom } from '../../state/main'
function HomePage() {
const [opened, setOpened] = useState(false);
const [serverConfig] = useAtom(serverConfigAtom)
const serverConfig = useContext(APIContext);
return (

View File

@@ -1,9 +1,11 @@
import React, {useState, useEffect, useContext, createContext} from 'react';
import { APIContext } from '../../App';
import { useAtom } from 'jotai'
import { activePageAtom, roomFilterAtom, serverConfigAtom } from '../../state/main';
import { Text, Loader, Center, Card, Image, Badge, Button, SimpleGrid, Group } from '@mantine/core'
import { useNavigate } from "react-router-dom";
import { useNotifications } from '@mantine/notifications';
import { backendAPI } from '../../services/backend-api';
@@ -11,8 +13,10 @@ function LocationsPage(props) {
// const [opened, setOpened] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const [locations, setLocations] = useState([])
const [serverConfig] = useAtom(serverConfigAtom)
const [, setRoomsFilter] = useAtom(roomFilterAtom)
const [, setActivePage] = useAtom(activePageAtom)
const serverConfig = useContext(APIContext);
const notifications = useNotifications();
const navigate = useNavigate();
@@ -42,6 +46,13 @@ function LocationsPage(props) {
}, [])
const navigateToRooms = (locationID) => {
console.log("Passedlocid: ", locationID)
setActivePage("rooms")
setRoomsFilter({"locationID": locationID})
navigate("/rooms")
}
return (
<>
@@ -49,7 +60,7 @@ function LocationsPage(props) {
<Center><Text>Locations</Text></Center>
<SimpleGrid cols={4} spacing="xl">
{ locations.map((location, idx) =>
<Card key={`${idx} - ${location.ID}`} component="a" onClick={(e) => {navigate("/rooms", { state: { locationID: location.ID}})}} shadow="sm" padding="md">
<Card key={`${idx} - ${location.ID}`} component="a" onClick={() => navigateToRooms(location.ID)} shadow="sm" padding="md">
<Card.Section>
{location.CoverPhoto ? <Image src={`${serverConfig.baseURL}/photos/locations/${location.Name}/${location.CoverPhoto}`}></Image> : <Text>No Photo</Text>}
</Card.Section>

View File

@@ -1,5 +1,6 @@
import React, {useState, useEffect, useContext, createContext} from 'react';
import { APIContext } from '../../App';
import { useAtom } from 'jotai'
import { roomFilterAtom, serverConfigAtom } from '../../state/main';
import { Text, Loader, Center, Card, Image, Badge, Button, SimpleGrid, Group } from '@mantine/core'
import { useLocation } from "react-router-dom";
import { useNotifications } from '@mantine/notifications';
@@ -11,8 +12,10 @@ function RoomsPage(props) {
// const [opened, setOpened] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const [rooms, setRooms] = useState([])
const [filter, setFilter] = useState("");
const [serverConfig] = useAtom(serverConfigAtom)
const [roomFilter, setRoomFilter] = useAtom(roomFilterAtom)
const serverConfig = useContext(APIContext);
const notifications = useNotifications();
const {state} = useLocation();
@@ -22,8 +25,9 @@ function RoomsPage(props) {
async function fetchSettings() {
let url = `rooms`
console.log("CURRENT STATE: ", state)
if (state) {
url = `rooms/${state.locationID}`
// if we are filtering by location
if (roomFilter.locationID) {
url = `rooms/${roomFilter.locationID}`
}
backendAPI.get(url).then(results => {
console.log("ROOMS: ", results)
@@ -45,6 +49,13 @@ function RoomsPage(props) {
}, [])
// Check if filter changes for this page and refresh results
useEffect(() => {
console.log("CURRENT ROOM FILTER: ", roomFilter)
}, [roomFilter, setFilter])
return (
<>
@@ -54,7 +65,7 @@ function RoomsPage(props) {
{ rooms.map((room, idx) =>
<Card key={`${room.ID}`} component="a" onClick={(e) => {}} shadow="sm" padding="md">
<Card.Section>
{room.CoverPhoto ? <Image src={`${serverConfig.baseURL}/photos/rooms/${room.Name}/${room.CoverPhoto}`}></Image> : <Text>No Photo</Text>}
{room.CoverPhoto ? <Image src={`${serverConfig.baseURL}/photos/locations/${room.CoverPhoto}`}></Image> : <Text>No Photo</Text>}
</Card.Section>
<Group position="apart">
<Text weight={500}>{room.Name}</Text>

View File

@@ -0,0 +1,11 @@
import { atom } from 'jotai'
export const serverConfigAtom = atom({})
// Pages state
export const activePageAtom = atom({})
// Filters for all pages to pass back and forth
export const locationFilterAtom = atom({})
export const roomFilterAtom = atom({})