diff --git a/documentation/docs/reference/services/Check-In.md b/documentation/docs/reference/services/Check-In.md index 6b53c59c..ee289eea 100644 --- a/documentation/docs/reference/services/Check-In.md +++ b/documentation/docs/reference/services/Check-In.md @@ -10,8 +10,7 @@ Response format: ``` { "id": "github0000001", - "hasCheckedIn": true, - "hasPickedUpSwag": true + "hasCheckedIn": true } ``` @@ -24,8 +23,7 @@ Response format: ``` { "id": "github0000001", - "hasCheckedIn": true, - "hasPickedUpSwag": true + "hasCheckedIn": true } ``` @@ -39,8 +37,7 @@ Request format: { "id": "github0000001", "override": true, - "hasCheckedIn": true, - "hasPickedUpSwag": true + "hasCheckedIn": true } ``` @@ -49,8 +46,7 @@ Response format: { "id": "github0000001", "override": true, - "hasCheckedIn": true, - "hasPickedUpSwag": true + "hasCheckedIn": true } ``` @@ -63,8 +59,7 @@ Request format: ``` { "id": "github0000001", - "hasCheckedIn": true, - "hasPickedUpSwag": true + "hasCheckedIn": true } ``` @@ -72,8 +67,7 @@ Response format: ``` { "id": "github0000001", - "hasCheckedIn": true, - "hasPickedUpSwag": true + "hasCheckedIn": true } ``` diff --git a/log/access.log b/log/access.log deleted file mode 100644 index e69de29b..00000000 diff --git a/services/checkin/README.md b/services/checkin/README.md index 8480b6f8..fa10c5a2 100644 --- a/services/checkin/README.md +++ b/services/checkin/README.md @@ -1,4 +1,4 @@ Checkin ======= -This is the checkin microservice supporting hackillinois. This service allows checkins to checkin and tracks if they picked up swag. +This is the checkin microservice supporting hackillinois. This service allows admitted attendees to check in to the event. diff --git a/services/checkin/models/user_checkin.go b/services/checkin/models/user_checkin.go index 0d33cf7e..7ec7f30b 100644 --- a/services/checkin/models/user_checkin.go +++ b/services/checkin/models/user_checkin.go @@ -1,9 +1,8 @@ package models type UserCheckin struct { - ID string `json:"id"` - Override bool `json:"override"` - HasCheckedIn bool `json:"hasCheckedIn"` - HasPickedUpSwag bool `json:"hasPickedUpSwag"` - RsvpData map[string]interface{} `json:"rsvpData"` + ID string `json:"id"` + Override bool `json:"override"` + HasCheckedIn bool `json:"hasCheckedIn"` + RsvpData map[string]interface{} `json:"rsvpData"` } diff --git a/services/checkin/service/checkin_service.go b/services/checkin/service/checkin_service.go index e0ded388..7e47c771 100644 --- a/services/checkin/service/checkin_service.go +++ b/services/checkin/service/checkin_service.go @@ -140,5 +140,5 @@ func GetAllCheckedInUsers() (*models.CheckinList, error) { Returns all checkin stats */ func GetStats() (map[string]interface{}, error) { - return db.GetStats("checkins", []string{"override", "hascheckedin", "haspickedupswag"}) + return db.GetStats("checkins", []string{"override", "hascheckedin"}) } diff --git a/services/checkin/tests/checkin_test.go b/services/checkin/tests/checkin_test.go index e37725df..16d1a921 100644 --- a/services/checkin/tests/checkin_test.go +++ b/services/checkin/tests/checkin_test.go @@ -2,13 +2,14 @@ package tests import ( "fmt" + "os" + "reflect" + "testing" + "github.com/HackIllinois/api/common/database" "github.com/HackIllinois/api/services/checkin/config" "github.com/HackIllinois/api/services/checkin/models" "github.com/HackIllinois/api/services/checkin/service" - "os" - "reflect" - "testing" ) var db database.Database @@ -46,10 +47,9 @@ func TestMain(m *testing.M) { */ func SetupTestDB(t *testing.T) { checkin := models.UserCheckin{ - ID: "testid", - HasCheckedIn: true, - HasPickedUpSwag: true, - RsvpData: map[string]interface{}{}, + ID: "testid", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } err := db.Insert("checkins", &checkin) @@ -83,10 +83,9 @@ func TestGetUserCheckinService(t *testing.T) { } expected_checkin := models.UserCheckin{ - ID: "testid", - HasCheckedIn: true, - HasPickedUpSwag: true, - RsvpData: map[string]interface{}{}, + ID: "testid", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } if !reflect.DeepEqual(checkin, &expected_checkin) { @@ -103,10 +102,9 @@ func TestCreateUserCheckinService(t *testing.T) { SetupTestDB(t) new_checkin := models.UserCheckin{ - ID: "testid2", - HasCheckedIn: true, - HasPickedUpSwag: false, - RsvpData: map[string]interface{}{}, + ID: "testid2", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } err := service.CreateUserCheckin("testid2", new_checkin) @@ -122,10 +120,9 @@ func TestCreateUserCheckinService(t *testing.T) { } expected_checkin := models.UserCheckin{ - ID: "testid2", - HasCheckedIn: true, - HasPickedUpSwag: false, - RsvpData: map[string]interface{}{}, + ID: "testid2", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } if !reflect.DeepEqual(checkin, &expected_checkin) { @@ -142,10 +139,9 @@ func TestUpdateUserCheckinService(t *testing.T) { SetupTestDB(t) checkin := models.UserCheckin{ - ID: "testid", - HasCheckedIn: true, - HasPickedUpSwag: false, - RsvpData: map[string]interface{}{}, + ID: "testid", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } err := service.UpdateUserCheckin("testid", checkin) @@ -161,10 +157,9 @@ func TestUpdateUserCheckinService(t *testing.T) { } expected_checkin := models.UserCheckin{ - ID: "testid", - HasCheckedIn: true, - HasPickedUpSwag: false, - RsvpData: map[string]interface{}{}, + ID: "testid", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } if !reflect.DeepEqual(updated_checkin, &expected_checkin) { @@ -181,10 +176,9 @@ func TestGetAllCheckedInUsersService(t *testing.T) { SetupTestDB(t) new_checkin := models.UserCheckin{ - ID: "testid2", - HasCheckedIn: false, - HasPickedUpSwag: false, - RsvpData: map[string]interface{}{}, + ID: "testid2", + HasCheckedIn: false, + RsvpData: map[string]interface{}{}, } err := service.CreateUserCheckin("testid2", new_checkin) @@ -194,10 +188,9 @@ func TestGetAllCheckedInUsersService(t *testing.T) { } new_checkin = models.UserCheckin{ - ID: "testid3", - HasCheckedIn: true, - HasPickedUpSwag: false, - RsvpData: map[string]interface{}{}, + ID: "testid3", + HasCheckedIn: true, + RsvpData: map[string]interface{}{}, } err = service.CreateUserCheckin("testid3", new_checkin)