Open shulkaolka opened 3 years ago
Looks like it is a duplicate for one functionality: https://github.com/elasticio/maester-client/blob/master/src/object.ts#L170
if (params?.objectFields) { Object.entries(params.objectFields).forEach(e => { if (e[1].Query) headers[`X-Query-${e[0]}`] = e[1].Query; if (e[1].Meta) headers[`X-Meta-${e[0]}`] = e[1].Meta; }) }
and https://github.com/elasticio/maester-client/blob/master/src/object.ts#L24
export function metaToHeaders(meta: ObjectMetadata): Record<string, string> { const headers: Record<string, string> = {}; for (const [key, value] of Object.entries(meta)) { headers[`${USER_META_HEADER_PREFIX}${key}`] = String(value); } return headers; }
Looks like it is a duplicate for one functionality: https://github.com/elasticio/maester-client/blob/master/src/object.ts#L170
and https://github.com/elasticio/maester-client/blob/master/src/object.ts#L24