import { Client, Databases } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
type Appwrite = {
endpoint: string;
project: string;
key: string;
self_signed: boolean;
};
export async function main(
auth: Appwrite,
database_id: string,
collection_name: string,
collection_id: string,
collection_permissions?: string[],
collection_document_security?: boolean,
collection_enabled?: boolean,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key);
const db = new Databases(client);
return await db.updateCollection(
database_id,
collection_id,
collection_name,
collection_permissions,
collection_document_security,
collection_enabled,
);
}
Submitted by admin 504 days ago
import { Client, Databases } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
type Appwrite = {
endpoint: string;
project: string;
key: string;
self_signed: boolean;
};
export async function main(
auth: Appwrite,
database_id: string,
collection_name: string,
collection_id: string,
collection_permissions?: string[],
collection_document_security?: boolean,
collection_enabled?: boolean,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const db = new Databases(client);
return await db.updateCollection(
database_id,
collection_id,
collection_name,
collection_permissions,
collection_document_security,
collection_enabled
)
}
Submitted by admin 507 days ago
import { Resource } from "https://deno.land/x/windmill@v1.87.0/mod.ts"
import { Client, Databases } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
export async function main(
auth: Resource<'appwrite'>,
database_id: string,
collection_name: string,
collection_id: string,
collection_permissions?: string[],
collection_document_security?: boolean,
collection_enabled?: boolean,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const db = new Databases(client);
return await db.updateCollection(
database_id,
collection_id,
collection_name,
collection_permissions,
collection_document_security,
collection_enabled
)
}
Submitted by adam186 622 days ago