MCPcopy Create free account
hub / github.com/astercloud/aster / handleSave

Function handleSave

studio/src/pages/Settings.tsx:26–41  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

24 };
25
26 const handleSave = async (model: string) => {
27 if (!editValues.input_price_per_m || !editValues.output_price_per_m) return;
28
29 try {
30 await updatePricing.mutateAsync({
31 model,
32 input_price_per_m: editValues.input_price_per_m,
33 output_price_per_m: editValues.output_price_per_m,
34 currency: editValues.currency || 'USD',
35 });
36 setEditingModel(null);
37 refetch();
38 } catch (error) {
39 console.error('Failed to update pricing:', error);
40 }
41 };
42
43 const handleAddModel = async () => {
44 if (!newModel.model) return;

Callers 1

SettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected