Created logic for creating lists
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user