Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/serifcolakel/requester-app


https://github.com/serifcolakel/requester-app

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

const handleCreateVariable = async (formData: FormData) => {
"use server";

const { userId } = auth();

if (!userId) {
throw new Error("User not authenticated");
}

const name = formData.get("name") as string;

const value = formData.get("value") as string;

await db.variable.create({
data: {
name,
value,
environmentId: userId,
},
});

};