Function comments

This commit is contained in:
s-prechtl 2022-09-27 07:37:13 +02:00
parent 23699abd68
commit 58e57978fd
4 changed files with 13 additions and 0 deletions

View file

@ -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: {

View file

@ -1,3 +1,6 @@
/**
* User.
*/
export class User {
id: number;
email: string;

View file

@ -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 = {

View file

@ -1,5 +1,8 @@
import type {User} from "../../../models/user";
/**
* User Login Auth.
*/
export interface Authentication {
jwt: string;
user: User;