0

so I'm quite new to MirageJS and I'm having trouble with its 'create' function. Here's my code for creating new data.

const _create = _this => {
_this.post('/section/create', async (schema, request) => {

    return schema.links.create("UI",{
        title: 'new',
        link: 'new',
        description: 'new',
    })

})

}

and the when i console log the result, this is what displays...

0: "U" 1: "I" id: "1"

I'm sorry, i dont know how to format it to display vertically in the editor.. but the data is an array with indexes that hold each character of what was supposed to be the title of the object..

Any help would be appreciated, thanks!

0 Answers0