mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 15:22:47 +01:00
refactor: remove pocketbase (#1138)
This commit is contained in:
21
app/data/scripts/upgradetest.py
Normal file
21
app/data/scripts/upgradetest.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import sys
|
||||
import json
|
||||
import random
|
||||
import os
|
||||
|
||||
from pocketbase import PocketBase
|
||||
|
||||
# Connect to the PocketBase server
|
||||
client = PocketBase(os.environ["CATALYST_APP_URL"])
|
||||
client.auth_store.save(token=os.environ["CATALYST_TOKEN"])
|
||||
|
||||
newtickets = client.collection("tickets").get_list(1, 200, {"filter": 'name = "New Ticket"'})
|
||||
for ticket in newtickets.items:
|
||||
client.collection("tickets").delete(ticket.id)
|
||||
|
||||
# Create a new ticket
|
||||
client.collection("tickets").create({
|
||||
"name": "New Ticket",
|
||||
"type": "alert",
|
||||
"open": True,
|
||||
})
|
||||
Reference in New Issue
Block a user