fix: adjusted some messages
parent
28e59ede86
commit
8c98a57e19
|
@ -70,7 +70,7 @@ class Endorsements(Resource):
|
|||
'''
|
||||
self.args = self.put_parser.parse_args()
|
||||
if not self.args.apikey:
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your overctrl.dbzer0.com account")
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your admin account")
|
||||
instance = database.find_instance_by_api_key(self.args.apikey)
|
||||
if not instance:
|
||||
raise e.NotFound(f"No Instance found matching provided API key and domain. Have you remembered to register it?")
|
||||
|
@ -121,7 +121,7 @@ class Endorsements(Resource):
|
|||
'''
|
||||
self.args = self.delete_parser.parse_args()
|
||||
if not self.args.apikey:
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your overctrl.dbzer0.com account")
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your admin account")
|
||||
instance = database.find_instance_by_api_key(self.args.apikey)
|
||||
if not instance:
|
||||
raise e.NotFound(f"No Instance found matching provided API key and domain. Have you remembered to register it?")
|
||||
|
|
|
@ -73,7 +73,7 @@ class Guarantees(Resource):
|
|||
'''
|
||||
self.args = self.put_parser.parse_args()
|
||||
if not self.args.apikey:
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your overctrl.dbzer0.com account")
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your admin account")
|
||||
instance = database.find_instance_by_api_key(self.args.apikey)
|
||||
if not instance:
|
||||
raise e.NotFound(f"No Instance found matching provided API key and domain. Have you remembered to register it?")
|
||||
|
@ -137,7 +137,7 @@ class Guarantees(Resource):
|
|||
'''
|
||||
self.args = self.delete_parser.parse_args()
|
||||
if not self.args.apikey:
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your overctrl.dbzer0.com account")
|
||||
raise e.Unauthorized("You must provide the API key that was PM'd to your admin account")
|
||||
instance = database.find_instance_by_api_key(self.args.apikey)
|
||||
if not instance:
|
||||
raise e.NotFound(f"No Instance found matching provided API key and domain. Have you remembered to register it?")
|
||||
|
|
|
@ -118,9 +118,9 @@ class ActivityPubPM:
|
|||
def pm_new_api_key(self, domain: str, username: str, software: str, requestor = None):
|
||||
api_key = secrets.token_urlsafe(16)
|
||||
if requestor:
|
||||
pm_content = f"user '{requestor}' has initiated an API Key reset for your domain {domain} on the [Fediseer](https://fediseer.com)\n\nThe new API key is\n\n{api_key}"
|
||||
pm_content = f"user '{requestor}' has initiated an API Key reset for your domain {domain} on the [Fediseer](https://fediseer.com)\n\nThe new API key is\n\n{api_key}\n**Please purge this message after storing the API key**"
|
||||
else:
|
||||
pm_content = f"Your API Key for domain {domain} is\n\n{api_key}\n\nUse this to perform operations on the [Fediseer](https://fediseer.com)."
|
||||
pm_content = f"Your API Key for domain {domain} is\n\n{api_key}\n\nUse this to perform operations on the [Fediseer](https://fediseer.com).\n\n**Please purge this message after storing the API key**"
|
||||
if not self.send_pm_to_right_software(
|
||||
message=pm_content,
|
||||
username=username,
|
||||
|
|
Loading…
Reference in New Issue