fix REST API permission checks (#209)

This commit is contained in:
Christoph Haas
2024-01-31 21:14:36 +01:00
parent 81e696fc7d
commit 1b4b5ff161
14 changed files with 239 additions and 26 deletions

View File

@@ -1,6 +1,18 @@
package domain
import "errors"
import (
"errors"
"runtime"
)
var ErrNotFound = errors.New("record not found")
var ErrNotUnique = errors.New("record not unique")
// GetStackTrace returns a stack trace of the current goroutine. The stack trace has at most 1024 bytes.
func GetStackTrace() string {
b := make([]byte, 1024)
n := runtime.Stack(b, false)
s := string(b[:n])
return s
}