bee-js icon indicating copy to clipboard operation
bee-js copied to clipboard

Bug: wrong `createTag` implementation in modules/tag.ts

Open Aviksaikat opened this issue 2 years ago • 2 comments

Overview

According to the docs the createTag is not taking account of the address parameter. As the parameter is not required but there should be an option to pass this.

file: modules/tag.ts

Solution

The correct implementation should be like this

export async function createTag(requestOptions: BeeRequestOptions, address: EthAddress | string): Promise<Tag> {
  const response = await http<Tag>(requestOptions, {
    method: 'post',
    url: endpoint,
    responseType: 'json',
   params: address
  })

  return response.data
}

Aviksaikat avatar Nov 25 '23 20:11 Aviksaikat

Hello @Aviksaikat!

Thank you for identifying the issue and providing the code sample.

Would you be up to creating a PR so your contribution is properly recorded?

Cafe137 avatar Nov 28 '23 19:11 Cafe137

sure thing

Aviksaikat avatar Nov 28 '23 19:11 Aviksaikat