17 lines
311 B
Ruby
17 lines
311 B
Ruby
module LdapManager
|
|
class UpdateNostrKey < LdapManagerService
|
|
def initialize(dn:, pubkey:)
|
|
@dn = dn
|
|
@pubkey = pubkey
|
|
end
|
|
|
|
def call
|
|
if @pubkey.present?
|
|
replace_attribute @dn, :nostrKey, @pubkey
|
|
else
|
|
delete_attribute @dn, :nostrKey
|
|
end
|
|
end
|
|
end
|
|
end
|