mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
Actually save
This commit is contained in:
@@ -250,10 +250,6 @@ async fn store_app(
|
||||
) -> Result<Json<SuccessResponse>, ErrorResponse> {
|
||||
let manager = GooseAppsManager::new()?;
|
||||
|
||||
if !manager.app_exists(&name) {
|
||||
return Err(ErrorResponse::internal(format!("App '{}' not found", name)));
|
||||
}
|
||||
|
||||
manager.update_app(&request.app)?;
|
||||
|
||||
Ok(Json(SuccessResponse {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { MainPanelLayout } from '../Layout/MainPanelLayout';
|
||||
import { Button } from '../ui/button';
|
||||
import { Input } from '../ui/input';
|
||||
import { GooseApp, iterateApp, storeApp } from '../../api';
|
||||
import { errorMessage } from '../../utils/conversionUtils';
|
||||
|
||||
interface GooseAppEditorProps {
|
||||
app?: GooseApp;
|
||||
@@ -128,10 +129,10 @@ export default function GooseAppEditor({ app, onReturn }: GooseAppEditorProps) {
|
||||
},
|
||||
},
|
||||
});
|
||||
} catch (_e) {
|
||||
console.log(_e);
|
||||
onReturn();
|
||||
} catch (e) {
|
||||
window.alert('Failed to save:' + errorMessage(e));
|
||||
}
|
||||
onReturn();
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user