lock the _mfas and _otps delete api rule, fixed flaky tests, fixed jsvm types example

This commit is contained in:
Gani Georgiev
2024-10-24 21:59:00 +03:00
parent 0b7741f1f7
commit 8c45d4d92d
13 changed files with 5639 additions and 5307 deletions

View File

@@ -51,6 +51,8 @@ func init() {
[[created]] TEXT DEFAULT (strftime('%Y-%m-%d %H:%M:%fZ')) NOT NULL,
[[updated]] TEXT DEFAULT (strftime('%Y-%m-%d %H:%M:%fZ')) NOT NULL
);
CREATE INDEX IF NOT EXISTS idx__collections_type on {{_collections}} ([[type]]);
`).Execute()
if execerr != nil {
return fmt.Errorf("_collections exec error: %w", execerr)
@@ -122,7 +124,6 @@ func createMFAsCollection(txApp core.App) error {
ownerRule := "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId"
col.ListRule = types.Pointer(ownerRule)
col.ViewRule = types.Pointer(ownerRule)
col.DeleteRule = types.Pointer(ownerRule)
col.Fields.Add(&core.TextField{
Name: "collectionRef",
@@ -162,7 +163,6 @@ func createOTPsCollection(txApp core.App) error {
ownerRule := "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId"
col.ListRule = types.Pointer(ownerRule)
col.ViewRule = types.Pointer(ownerRule)
col.DeleteRule = types.Pointer(ownerRule)
col.Fields.Add(&core.TextField{
Name: "collectionRef",