Feat/attachments (#9526)
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com>
This commit is contained in:
parent
4fd2743efa
commit
7a1d6fe509
445 changed files with 11759 additions and 6922 deletions
|
|
@ -1,5 +1,21 @@
|
|||
import type { HttpNodeType } from './types'
|
||||
import { type BodyPayload, BodyPayloadValueType } from './types'
|
||||
|
||||
export const checkNodeValid = (payload: HttpNodeType) => {
|
||||
return true
|
||||
export const transformToBodyPayload = (old: string, hasKey: boolean): BodyPayload => {
|
||||
if (!hasKey) {
|
||||
return [
|
||||
{
|
||||
type: BodyPayloadValueType.text,
|
||||
value: old,
|
||||
},
|
||||
]
|
||||
}
|
||||
const bodyPayload = old.split('\n').map((item) => {
|
||||
const [key, value] = item.split(':')
|
||||
return {
|
||||
key: key || '',
|
||||
type: BodyPayloadValueType.text,
|
||||
value: value || '',
|
||||
}
|
||||
})
|
||||
return bodyPayload
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue