-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added register & unregister methods to Barricade
Added logic to be able to disable individual APIs in Barricade
- Loading branch information
1 parent
a874b83
commit 279a126
Showing
26 changed files
with
2,898 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { createBarricade } from '@mutualmobile/react-native-barricade'; | ||
import { | ||
createBarricade, | ||
getBarricadeInstance, | ||
} from '@mutualmobile/react-native-barricade'; | ||
|
||
import { RecentApiRequestConfig } from './api/recent.api.mock'; | ||
import { SearchApiRequestConfig } from './api/search.api.mock'; | ||
|
||
export const mockServer = () => { | ||
const barricade = createBarricade([ | ||
RecentApiRequestConfig, | ||
SearchApiRequestConfig, | ||
]); | ||
barricade.start(); // We can all call this like - getBarricadeInstance()?.start(); | ||
const barricade = createBarricade([RecentApiRequestConfig]); | ||
barricade.start(); // We can also call this like - getBarricadeInstance()?.start(); | ||
getBarricadeInstance()?.registerRequest(SearchApiRequestConfig); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.