virtualeconomy / v-systems

V Systems Reference Full Node
Other
115 stars 45 forks source link

Contract last token API #251

Closed ncying closed 3 years ago

ncying commented 3 years ago

PR Details

Description

Add contract last token API Remove contract data API key request

Related Issue

None

How Has This Been Tested

All unit test passed

Types of changes

Checklist

codecov-io commented 3 years ago

Codecov Report

Merging #251 (b77ef53) into master (7875b61) will decrease coverage by 0.08%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
- Coverage   66.42%   66.34%   -0.09%     
==========================================
  Files         199      199              
  Lines        5770     5776       +6     
  Branches      277      262      -15     
==========================================
- Hits         3833     3832       -1     
- Misses       1937     1944       +7     
Impacted Files Coverage Δ
...cala/vsys/api/http/contract/ContractApiRoute.scala 0.00% <0.00%> (ø)
src/main/scala/vsys/network/Handshake.scala 75.00% <0.00%> (-2.50%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7875b61...b77ef53. Read the comment docs.

SheldonYS commented 3 years ago

API seems not found. When I call the /contract/lastTokenIndex/{contractId} ( for instance, http://test.v.systems:9922/contract/lastTokenIndex/CF5Tz9U9ytxw7H1vQxxLJhsYEmd7NJsk2QN ), the get response with "The requested resource could not be found but may be available again in the future."

ncying commented 3 years ago

API seems not found. When I call the /contract/lastTokenIndex/{contractId} ( for instance, http://test.v.systems:9922/contract/lastTokenIndex/CF5Tz9U9ytxw7H1vQxxLJhsYEmd7NJsk2QN ), the get response with "The requested resource could not be found but may be available again in the future."

add to path prefix in https://github.com/virtualeconomy/v-systems/pull/251/commits/b77ef532f209e8fd26f72f56d7ed1fbbbe6113da

SheldonYS commented 3 years ago

We'd better remove authorizations = Array(new Authorization("api_key")) at Line 105 in src/main/scala/vsys/api/http/contract/ContractApiRoute.scala. Or there is lock icon in Swagger for ​/contract​/data​/{contractId}​/{key} API (though no need API Key).

Screenshot 2021-01-06 at 2 32 43 PM
ncying commented 3 years ago

We'd better remove authorizations = Array(new Authorization("api_key")) at Line 105 in src/main/scala/vsys/api/http/contract/ContractApiRoute.scala. Or there is lock icon in Swagger for ​/contract​/data​/{contractId}​/{key} API (though no need API Key).

Screenshot 2021-01-06 at 2 32 43 PM

Resolved in https://github.com/virtualeconomy/v-systems/pull/256

SheldonYS commented 3 years ago

It seems the lastTokenIndex API not actually show the index of last existed token. For instance,