refactor(*): 稳定期治理 - 收敛核心架构、错误语义并修复跨项目数据竞态
This commit is contained in:
1 parent
bacd502f5c
commit
b5f3413ded
298 files changed
+12681
-26428
No files matched your search
@@ -325,16 +325,7 @@ func canvasResourceID(value string) string {
|
||||
if strings.HasPrefix(value, "resource:") {
|
||||
return validCanvasResourceID(strings.TrimPrefix(value, "resource:"))
|
||||
}
|
||||
const prefix = "/api/resources/"
|
||||
index := strings.Index(value, prefix)
|
||||
if index < 0 {
|
||||
return ""
|
||||
}
|
||||
remainder := value[index+len(prefix):]
|
||||
if end := strings.IndexByte(remainder, '/'); end >= 0 {
|
||||
remainder = remainder[:end]
|
||||
}
|
||||
return validCanvasResourceID(remainder)
|
||||
return validCanvasResourceID(resourceIDFromFileURL(value))
|
||||
}
|
||||
|
||||
func validCanvasResourceID(value string) string {
|
||||
|
||||
Reference in new issue
Block a user