Function comments
This commit is contained in:
parent
23699abd68
commit
58e57978fd
4 changed files with 13 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
import {toast} from "@zerodevx/svelte-toast";
|
||||
import {capitalizeFirstLetter} from "./PomeloUtils";
|
||||
|
||||
/**
|
||||
* Creates an error message toast with red background.
|
||||
* @param m
|
||||
*/
|
||||
export const createErrorToast = (m: string) => {
|
||||
toast.push("Error: " + capitalizeFirstLetter(m), {
|
||||
theme: {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* User.
|
||||
*/
|
||||
export class User {
|
||||
id: number;
|
||||
email: string;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
let rememberMe: boolean = true;
|
||||
|
||||
|
||||
/**
|
||||
* Handles the button click.
|
||||
*/
|
||||
async function handleSubmit() {
|
||||
const endpoint = "http://localhost:1337/api/auth/local";
|
||||
const payload = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import type {User} from "../../../models/user";
|
||||
|
||||
/**
|
||||
* User Login Auth.
|
||||
*/
|
||||
export interface Authentication {
|
||||
jwt: string;
|
||||
user: User;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue