shelcia / mocker

Mocker can generate mock data with API endpoints, powered by faker.js
https://mocker-gen.netlify.app/
GNU General Public License v3.0
17 stars 29 forks source link

The resource link has problem #116

Open yangwawa0323 opened 1 year ago

yangwawa0323 commented 1 year ago

When login successfully into dashboard. All the resource link is point /api/user/:endpoint, this make people confused. It should be /api/resource/:endpoint. Another problem is couldn't use COPY button copy to clipboard.

in FE collection.jsx

<Alert sx={{ mb: 2 }}>
        <AlertTitle sx={{ fontWeight: 600 }}>API endpoint</AlertTitle>
        <code>{BACKEND_URL}/resource/:endpoint</code>
        <CopyButton
            sx={{ ml: 1 }}
            disabled={isCopied ? true : false}
            onClick={() => {
                handleCopyClick(`${BACKEND_URL}/resource/:endpoint`);
            }}
        >
            {isCopied ? 'Done' : 'Copy'}
        </CopyButton>
</Alert>

In FE EndpointModel.jsx

<CopyButton
        onClick={() =>
        handleCopyClick(
        `${BACKEND_URL}/resource/${result}${point.endpoint}`,
        idx
        )
        }
        disabled={isCopied === idx ? true : false}
>
    {isCopied === idx ? 'Done' : 'Copy'}
</CopyButton>
GitWiz01 commented 1 year ago

@shelcia please assign me this issue under IWOC'23

29deepanshutyagi commented 8 months ago

i want to work on this under iwoc , kindly assign me this issue @shelcia