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
app.on 'middleware:after:router',(eventargs)-> | |
routes = [] | |
app._router.stack.forEach (route)-> | |
getPath = (route)-> | |
route.path ||route.route?.path || route.regexp.toString().match(/[\/\w]+/g)[1..-4].join("") | |
recurPath = (route,head,arr)-> | |
routeStr = getPath(route) | |
if route.handle?.stack | |
route.handle.stack.forEach (subRoute)-> | |
recurPath(subRoute,head+routeStr,arr) |
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
_upload() { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'http://posttestserver.com/post.php'); | |
xhr.onload = () => { | |
this.setState({isUploading: false}); | |
if (xhr.status !== 200) { | |
AlertIOS.alert( | |
'Upload failed', | |
'Expected HTTP 200 OK response, got ' + xhr.status | |
); |
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
<?php | |
use Symfony\Component\Yaml\Yaml; | |
return Yaml::parse(file_get_contents(base_path().'/resources/lang/zh_cn/validation.yml')); |