mikepb/sage

map() won't get mapping

Closed this issue · 3 comments

The description op map() in line 706 says: Get or set mapping.
However, due to a small typo this does not work. Line 727 is:

      return request(request.q ? 'PUT' : 'GET',
        (request.p ? request.p + '/' : '') + '_mapping'
      );

but that should be:

      return request(request.b ? 'PUT' : 'GET',
        (request.p ? request.p + '/' : '') + '_mapping'
      );

(rotate 'q' 180 degrees so it becomes 'b').

Thanks @nverwer ! The source docs for the method was also incorrect for putting a mapping.

I've pushed v0.4.0 to npm to fix these bugs :)

Also pushed v0.4.1 to rename type.type to type.name to match online documentation and avoid a conflict with index.type()

Thank you @mikepb! It is good to see that sage is actively maintained.