dov-yih/resource-oriented-request

[BUG] Once @baseURL been used, baseURL would changed forever!

Closed this issue · 1 comments

example

@baseURL('http://localhost:7001')
class Post extends API {}

@baseURL('http://localhost:7001/admin')
class User extends API {}

Post.get() 
// => http://localhost:7001/admin/posts
// not http://localhost:7001/posts as expect!

The Solution: When we use decorator means that config will apply globally, while using static properties mean it only works in child class.