[App Search] Fix bash API code example (#106015)
* Fix bash/curl API code example not correctly having `\`s at the end of non-body lines - Doing this requires removing the `dedent()` fn which is messing up backslashes - Removing dedent requires setting the template literal indentation to 0 and changing the indent level on DOCUMENTS_API_JSON_EXAMPLE * I unindented DOCUMENTS_API_JSON_EXAMPLE too hard - the { is no longer lined up with the [ I think??? what am I even doing with my life
This commit is contained in:
parent
5b68c54568
commit
da7c43c1db
|
@ -7,8 +7,6 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
import dedent from 'dedent';
|
||||
|
||||
import { useValues, useActions } from 'kea';
|
||||
|
||||
import {
|
||||
|
@ -107,10 +105,10 @@ export const FlyoutBody: React.FC = () => {
|
|||
</EuiFlexGroup>
|
||||
</EuiPanel>
|
||||
<EuiCodeBlock language="bash" fontSize="m" isCopyable>
|
||||
{dedent(`
|
||||
curl -X POST '${documentsApiUrl}'
|
||||
-H 'Content-Type: application/json'
|
||||
-H 'Authorization: Bearer ${apiKey}'
|
||||
{`\
|
||||
curl -X POST '${documentsApiUrl}' \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
-H 'Authorization: Bearer ${apiKey}' \\
|
||||
-d '${DOCUMENTS_API_JSON_EXAMPLE}'
|
||||
# Returns
|
||||
# [
|
||||
|
@ -122,8 +120,7 @@ export const FlyoutBody: React.FC = () => {
|
|||
# "id": "park_saguaro",
|
||||
# "errors": []
|
||||
# }
|
||||
# ]
|
||||
`)}
|
||||
# ]`}
|
||||
</EuiCodeBlock>
|
||||
</EuiFlyoutBody>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue