Add update endpoint for ContactRequests

This commit is contained in:
Alex Sherman 2021-01-11 14:52:03 +05:00
parent 1bbacbf56c
commit b708cebbfd
5 changed files with 61 additions and 9 deletions

View file

@ -23,6 +23,11 @@ class ContactRequest < ApplicationRecord
contact_request.save!
end
def update_status(status)
self.status = status
save!
end
def self.create_random_secret
SecureRandom.hex(64)
end