loottracker: submit loot when not logged in
This is to aid the wiki drop log project. The data is not otherwise stored.
This commit is contained in:
@@ -27,6 +27,7 @@ package net.runelite.http.service.loottracker;
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
@@ -91,7 +92,10 @@ public class LootTrackerControllerTest
|
||||
lootRecord.setDrops(Collections.singletonList(new GameItem(4151, 1)));
|
||||
|
||||
String data = RuneLiteAPI.GSON.toJson(Collections.singletonList(lootRecord));
|
||||
mockMvc.perform(post("/loottracker").content(data).contentType(MediaType.APPLICATION_JSON))
|
||||
mockMvc.perform(post("/loottracker")
|
||||
.header(RuneLiteAPI.RUNELITE_AUTH, UUID.nameUUIDFromBytes("test".getBytes()))
|
||||
.content(data)
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().isOk());
|
||||
|
||||
verify(lootTrackerService).store(eq(Collections.singletonList(lootRecord)), anyInt());
|
||||
|
||||
Reference in New Issue
Block a user