(
api.macros/defendpoint
:get
"/attributes"
"Fetch a list of possible keys for User `login_attributes`. This just looks at keys that have already been set for
existing Users and returns those. "
[
]
(
->>
(
for
[
login-attributes
(
t2/select-fn-set
:login_attributes
:model/User
:login_attributes
[
:not=
nil
]
{
:limit
1000
}
)
:when
(
seq
login-attributes
)
]
(
set
(
keys
login-attributes
)
)
)
(
reduce
set/union
#{
}
)
)
)