mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-30 12:40:48 +02:00
Add backend code to delete entries that have already been read + start collecitng data on usage data so we can eventually prune data from users that are no longer using hishtory
This commit is contained in:
@ -43,6 +43,7 @@ func TestESubmitThenQuery(t *testing.T) {
|
||||
|
||||
// Query for device id 1
|
||||
w := httptest.NewRecorder()
|
||||
// TODO: update this to include the user ID
|
||||
searchReq := httptest.NewRequest(http.MethodGet, "/?device_id="+devId1, nil)
|
||||
apiEQueryHandler(w, searchReq)
|
||||
res := w.Result()
|
||||
@ -72,6 +73,7 @@ func TestESubmitThenQuery(t *testing.T) {
|
||||
|
||||
// Same for device id 2
|
||||
w = httptest.NewRecorder()
|
||||
// TODO: update this to include the user ID
|
||||
searchReq = httptest.NewRequest(http.MethodGet, "/?device_id="+devId2, nil)
|
||||
apiEQueryHandler(w, searchReq)
|
||||
res = w.Result()
|
||||
@ -101,6 +103,7 @@ func TestESubmitThenQuery(t *testing.T) {
|
||||
// Bootstrap handler should return 2 entries, one for each device
|
||||
w = httptest.NewRecorder()
|
||||
searchReq = httptest.NewRequest(http.MethodGet, "/?user_id="+data.UserId("key"), nil)
|
||||
// TODO: update to include device_id
|
||||
apiEBootstrapHandler(w, searchReq)
|
||||
res = w.Result()
|
||||
defer res.Body.Close()
|
||||
|
Reference in New Issue
Block a user