-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
How would you handle admin calls now which use an extended |
@SilentGert yes this would make it more explicit right now. Like: import { API_BASE } from '../somewhere'
const fetch = (callApi) => ({ id }) => callApi(`${API_BASE}/admin/users/${id}`) In our codebase, we could then get rid of all those wrappers that try to find a good name for essentially added a different prefix to the URL :) |
bcfea5b
to
e92ab64
Compare
This is a good candidate for pair/mob reviewing! |
e92ab64
to
ea3806c
Compare
Codecov Report
@@ Coverage Diff @@
## master #371 +/- ##
=========================================
- Coverage 92.33% 91.24% -1.1%
=========================================
Files 55 57 +2
Lines 1919 2091 +172
Branches 375 408 +33
=========================================
+ Hits 1772 1908 +136
- Misses 138 174 +36
Partials 9 9
Continue to review full report at Codecov.
|
bust cache again bust cache for good bust cache for good for real
977d3b1
to
0ba0cd6
Compare
BREAKING
API function
fetch
,create
,update
, andremove
must be declared differently now. ThecallApi
method will be injected now. In addition to the newaddMetaData
action, this allows us to set custom headers for allkraken
calls.Additionally, the new
apiBase
property will be injected which can also be set through theaddMetaData
action. With that, you can provide an API base to all calls.