@@ -247,9 +247,7 @@ func openBrowser(url string) {
247247func handlePush () {
248248 pushFlags := flag .NewFlagSet ("push" , flag .ExitOnError )
249249 configFile := pushFlags .String ("config" , defaultConfigPath , "Path to config file" )
250- configName := pushFlags .String ("title" , "" , "Configuration title" )
251250 remoteURL := pushFlags .String ("remote" , "" , "Custom API base URL (e.g., localhost:3000, api.example.com)" )
252- namespace := pushFlags .String ("namespace" , "" , "Namespace for the configuration (e.g., my-group)" )
253251 pushFlags .Parse (os .Args [2 :])
254252
255253 if _ , err := os .Stat (* configFile ); err != nil {
@@ -282,24 +280,14 @@ func handlePush() {
282280 os .Exit (1 )
283281 }
284282
285- // Get configuration name from directory name if not specified
286- if * configName == "" {
287- dir , err := os .Getwd ()
288- if err != nil {
289- fmt .Println ("Error getting current directory:" , err )
290- os .Exit (1 )
291- }
292- * configName = filepath .Base (dir )
293- }
294-
295283 // Send configuration to server
296- err = pushConfig (token , * configName , string (config ), apiURL , * namespace )
284+ err = pushConfig (token , string (config ), apiURL )
297285 if err != nil {
298286 fmt .Println ("Error pushing config:" , err )
299287 os .Exit (1 )
300288 }
301289
302- fmt .Printf ("Configuration '%s' pushed successfully to %s!\n " , * configName , apiURL )
290+ fmt .Printf ("Configuration pushed successfully to %s!\n " , apiURL )
303291}
304292
305293// isTerminalInteractive checks if we're running in an interactive terminal
@@ -417,11 +405,9 @@ func validatePincode(apiURL, pincode string) (string, error) {
417405 return result .Token , nil
418406}
419407
420- func pushConfig (token , name , content , apiURL , namespace string ) error {
408+ func pushConfig (token , content , apiURL string ) error {
421409 reqBody , err := json .Marshal (map [string ]string {
422- "name" : name ,
423410 "content" : content ,
424- "namespace" : namespace ,
425411 })
426412 if err != nil {
427413 return fmt .Errorf ("error creating request: %v" , err )
0 commit comments