mocker
mocker copied to clipboard
The resource link has problem
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>