Skip to content

Commit dfe3d17

Browse files
authored
Merge pull request #670 from pennlabs/davidcfu/agh-booking
AGH Booking Support
2 parents 1533c7e + 54b1654 commit dfe3d17

5 files changed

Lines changed: 184 additions & 159 deletions

File tree

.github/workflows/android-workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
142142
# Run JaCoCo, generate Test Report
143143
- name: Check Code Coverage
144-
run: ./gradlew jacocoTestReport --stacktrace
144+
run: ./gradlew testDebugUnitTest jacocoTestReport --stacktrace
145145

146146
# Upload reports to GitHub Actions
147147
- name: Upload Reports

PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/Serializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ public List<GSRLocation> deserialize(JsonElement je, Type type, JsonDeserializat
153153
location.gid = jsonLocation.get("gid").getAsInt();
154154
location.name = jsonLocation.get("name").getAsString();
155155
location.kind = jsonLocation.get("kind").getAsString();
156+
location.bookableDays = jsonLocation.get("bookable_days").getAsInt();
156157
locations.add(location);
157158
}
158159
return locations;

PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/StudentLife.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,12 @@ interface StudentLife {
187187
): Observable<DiningHall?>
188188

189189
@GET("gsr/locations")
190-
fun location(): Observable<List<GSRLocation?>?>
190+
fun locationUnfiltered(): Observable<List<GSRLocation?>?>
191+
192+
@GET("gsr/user-locations")
193+
fun location(
194+
@Header("Authorization") bearerToken: String?,
195+
): Observable<List<GSRLocation?>?>
191196

192197
@GET("events/fling")
193198
fun getFlingEvents(): Observable<List<FlingEvent?>?>

PennMobile/src/main/java/com/pennapps/labs/pennmobile/gsr/classes/GSRLocation.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ class GSRLocation {
2727
@Expose
2828
@JvmField
2929
var kind: String? = null
30+
31+
@SerializedName("bookable_days")
32+
@Expose
33+
@JvmField
34+
var bookableDays: Int = 7
3035
}

0 commit comments

Comments
 (0)