Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: create idp in postgres

Steven423861d48c44
diff --git a/store/db/postgres/idp.go b/store/db/postgres/idp.go
index 81afba5ed..34a1165b9 100644
--- a/store/db/postgres/idp.go
+++ b/store/db/postgres/idp.go
@@ -10,7 +10,7 @@ import (
func (d *DB) CreateIdentityProvider(ctx context.Context, create *store.IdentityProvider) (*store.IdentityProvider, error) {
fields := []string{"name", "type", "identifier_filter", "config"}
- args := []any{create.Name, create.Type.Type(), create.IdentifierFilter, create.Config}
+ args := []any{create.Name, create.Type.String(), create.IdentifierFilter, create.Config}
stmt := "INSERT INTO idp (" + strings.Join(fields, ", ") + ") VALUES (" + placeholders(len(args)) + ") RETURNING id"
if err := d.db.QueryRowContext(ctx, stmt, args...).Scan(&create.ID); err != nil {
return nil, err