# -*- coding: utf-8 -*- # graph_save.dspy — 保存画布(新建/更新,保存即校验+编译) # POST /drag/api/graph_save.dspy body: {id?, name, description?, blocks, connections} try: ns = dict(params_kw) if 'id' in ns and not ns.get('id'): ns.pop('id', None) result = await graph_save(ns) return result except Exception as e: return {'success': False, 'message': 'graph_save.dspy: ' + str(e)}