Skip to content

Commit 445ecdc

Browse files
committed
Implement loggedin method
1 parent 355223e commit 445ecdc

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@freenit-framework/core",
3-
"version": "0.0.45",
3+
"version": "0.0.46",
44
"private": false,
55
"author": "Goran Mekić <meka@tilda.center>",
66
"license": "BSD-2-Clause",

src/lib/base-store/auth.svelte.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export default class AuthStore {
3737
return response
3838
}
3939

40+
loggedin = () => {
41+
return Boolean(this.store.user.profile.id)
42+
}
43+
4044
register = async (email: string, password: string) => {
4145
const response = await methods.post(`${this.prefix}/auth/register`, {
4246
email,

0 commit comments

Comments
 (0)