feat: add some shit

This commit is contained in:
2023-11-12 18:31:24 +01:00
parent 89a202b0a2
commit 057257edd5
16 changed files with 133 additions and 43 deletions

View File

@ -3,6 +3,12 @@ import { POCKETBASE_URL } from "$env/dynamic/private"
const pb = new Pocketbase(POCKETBASE_URL || "http://localhost:8090");
export async function getPublicPortraits() {
return (await pb.collection("invites").getList(1, 100, {
filter: pb.filter(`portrait_public = true`)
})).items
}
export function createPerson({ name, confidence, portrait, portrait_public, noble_name, hair_color, hair_type, hair_length }: { name: string, portrait: string, portrait_public: boolean, hair_type: string, hair_length: string, hair_color: string, confidence: number, noble_name: string }) {
return pb.collection("invites").create({
name,

View File

@ -100,8 +100,6 @@ export async function addPerson({ name, confidence, noble_name }: { name: string
if (!api) return;
console.log({ name, confidence, noble_name });
return api.spreadsheets.values.append({
auth, //auth object
spreadsheetId: GOOGLE_SHEET_ID, // spreadsheet id