Created logic for creating lists
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-04-25 22:32:24 +02:00
parent ab57857deb
commit 28069a92f1
7 changed files with 185 additions and 105 deletions

View File

@@ -1,18 +1,21 @@
import { result } from '../../common/result'
export type Wish = {
id: string
name: string
description?: string
link?: string
}
export const createWish = (
id: string,
name: string,
description?: string,
link?: string
description: string = '',
link: string = ''
): result.Result<Wish, string> => {
if (typeof name !== 'undefined' && name.length > 0) {
if (typeof name !== 'undefined') {
return result.ok({
id,
name,
description,
link,