@chiselstrike/api
Advanced tools
Comparing version
@@ -126,2 +126,4 @@ /// <reference lib="dom" /> | ||
export declare function labels(..._val: string[]): <T>(_target: T, _propertyName: string) => void; | ||
/** Returns the currently logged-in user or null if no one is logged in. */ | ||
export declare function loggedInUser(): Promise<OAuthUser | null>; | ||
export {}; |
@@ -280,1 +280,6 @@ // SPDX-FileCopyrightText: © 2021 ChiselStrike <info@chiselstrike.com> | ||
} | ||
/** Returns the currently logged-in user or null if no one is logged in. */ | ||
export async function loggedInUser() { | ||
const id = await Deno.core.opAsync("chisel_user", {}); | ||
return id == null ? null : await OAuthUser.findOne({ id }); | ||
} |
{ | ||
"name": "@chiselstrike/api", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"main": "lib/chisel.js", | ||
@@ -5,0 +5,0 @@ "types": "lib/chisel.d.ts", |
20484
1.91%533
1.33%