このコミットが含まれているのは:
テクニカル諏訪子 2019-07-29 14:50:33 +09:00
コミット 39883a7213
4個のファイルの変更17行の追加4行の削除

ファイルの表示

@ -7,7 +7,15 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class BashController extends Controller {
public function ls($pwd) { // /api/rpc/bash/ls/pwd
return 'page forum store user';
public function exec (Request $r) { // /api/rpc/bash/exec
if ($r->arg[0] == 'ls') {
return $this->ls($r->arg[2], $r->arg[1]);
}
return ;
}
public function ls($pwd='', $opt='') {
return 'page forum user';
}
}

ファイルの表示

@ -72,7 +72,9 @@
},
ls(pwd) {
var neopwd = pwd.replace('/', 'sl');
axios.get('/api/rpc/bash/ls/' + neopwd).then(res => {
axios.get('/api/rpc/bash/exec', {
arg: ['ls', '', '']
}).then(res => {
this.result.push({
username: this.user,
hostname: this.host,

ファイルの表示

@ -8,3 +8,6 @@
// Bootstrap
@import '~bootstrap/scss/bootstrap';
html {
cursor: text;
}

ファイルの表示

@ -10,4 +10,4 @@
*/
// Commands
Route::get('/api/rpc/bash/ls/{pwd}', 'BashController@ls');
Route::get('/api/rpc/bash/exec', 'BashController@exec');