import { createItem } from "https://deno.land/x/netzo@0.2.84/plugins/portals/utils/db.ts";
Creates a new item in the database. Throws if the item already exists in one of the indexes.
Examples
Example 1
Example 1
import { createItem } from "netzo/plugins/portals/utils/db.ts";
import { ulid } from "std/ulid/mod.ts";
await createItem({
id: ulid(),
userLogin: "john_doe",
title: "example-title",
url: "https://example.com",
score: 0,
});
Parameters
item: Item