added comments
This commit is contained in:
@ -7,10 +7,9 @@ import { randomBytes } from "crypto";
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
export async function generateShareToken(id: number): Promise<{
|
export async function generateShareToken(id: number): Promise<{
|
||||||
token?: string; // share token
|
token?: string;
|
||||||
id?: string; // playlog id after the token
|
id?: string;
|
||||||
error?: string; // error
|
error?: string;
|
||||||
}> {
|
|
||||||
const { user } = await getAuth();
|
const { user } = await getAuth();
|
||||||
|
|
||||||
if (!user || !user.id || typeof user.id !== "string") {
|
if (!user || !user.id || typeof user.id !== "string") {
|
||||||
|
Reference in New Issue
Block a user