Attempt at fixing route removal.
This commit is contained in:
parent
da14d7c80f
commit
64ab445c54
2 changed files with 3 additions and 8 deletions
|
@ -739,10 +739,8 @@ if [[ ( $2 == "-r" ) || ( $2 == "-remove" ) ]]; then VCMD="y"
|
||||||
|
|
||||||
# Remove admin routes
|
# Remove admin routes
|
||||||
log_bright "[INFO] Removing admin routes.."
|
log_bright "[INFO] Removing admin routes.."
|
||||||
OLDROUTE_RESULT=$(sed ':a;N;$!ba;s/\n/___NEWLINE___/g' .blueprint/data/extensions/$identifier/.store/build/route.php) # Read the contents of route.php into the variable, replacing \n with a placeholder string
|
OLDROUTE_RESULT=$(cat .blueprint/data/extensions/$identifier/.store/build/route.php | sed "s#\n##g")
|
||||||
sed -i "s#$(echo "$OLDROUTE_RESULT" | sed 's/[\/&]/\\&/g')##g" routes/admin.php # Perform the sed operation, using the placeholder string as the delimiter
|
sed -i "s#$OLDROUTE_RESULT##g" routes/admin.php # Perform the sed operation, using the placeholder string as the delimiter
|
||||||
OLDROUTE_RESULT=$(echo "$OLDROUTE_RESULT" | sed 's/___NEWLINE___/\n/g') # Restore the original newlines in the $OLDROUTE_RESULT variable
|
|
||||||
|
|
||||||
# Remove admin view
|
# Remove admin view
|
||||||
log_bright "[INFO] Removing admin view.."
|
log_bright "[INFO] Removing admin view.."
|
||||||
rm -R resources/views/admin/extensions/$identifier
|
rm -R resources/views/admin/extensions/$identifier
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
Route::group(['prefix' => 'extensions/␀id␀'], function () {
|
Route::group(['prefix' => 'extensions/␀id␀'], function () {Route::get('/', [Admin\Extensions\␀id␀\␀id␀ExtensionController::class, 'index'])->name('admin.extensions.␀id␀.index');Route::patch('/', [Admin\Extensions\␀id␀\␀id␀ExtensionController::class, 'update']);});
|
||||||
Route::get('/', [Admin\Extensions\␀id␀\␀id␀ExtensionController::class, 'index'])->name('admin.extensions.␀id␀.index');
|
|
||||||
Route::patch('/', [Admin\Extensions\␀id␀\␀id␀ExtensionController::class, 'update']);
|
|
||||||
});
|
|
Loading…
Reference in a new issue