Web 端数据交互与 design2 布局修复
统一门户 JSON 契约:新增 GET /templates/{id},模板/云文件/保存/打开走虚拟 key;
layer 保存弹层替代 prompt,本地 .soon 已登录后台 POST 登记;修复保存静默失败与 design2 全宽布局。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -44,6 +44,20 @@ final class FileController
|
||||
Json::ok(FileService::create($u['id'], $name, $json));
|
||||
}
|
||||
|
||||
public function show(int $id): void
|
||||
{
|
||||
$u = Auth::require();
|
||||
$row = FileService::fetch($u['id'], $id);
|
||||
Json::ok([
|
||||
'id' => (int)$row['id'],
|
||||
'name' => (string)$row['name'],
|
||||
'version' => (int)$row['version'],
|
||||
'size' => (int)$row['size'],
|
||||
'updated_at' => $row['updated_at'],
|
||||
'json' => (string)$row['json'],
|
||||
]);
|
||||
}
|
||||
|
||||
public function update(int $id): void
|
||||
{
|
||||
$u = Auth::require();
|
||||
|
||||
Reference in New Issue
Block a user