Having the clear locations endpoint only clear world locations, and adding endpoint to remove all items
This commit is contained in:
@@ -44,4 +44,14 @@ public class ItemService
|
||||
{
|
||||
await _items.DeleteOneAsync(i => i.Id == id);
|
||||
}
|
||||
|
||||
public virtual async Task DeleteByLocationAsync(string locationId)
|
||||
{
|
||||
await _items.DeleteManyAsync(i => i.LocationId == locationId);
|
||||
}
|
||||
|
||||
public virtual async Task DeleteAllAsync()
|
||||
{
|
||||
await _items.DeleteManyAsync(_ => true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user