Compare commits
3 Commits
1f11b6b58c
...
45c4f9cf79
Author | SHA1 | Date |
---|---|---|
db0 | 45c4f9cf79 | |
db0 | 898500c5a0 | |
db0 | 687e8599fd |
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
# 0.19.1
|
||||
|
||||
* Fixed Deleting tags
|
||||
|
||||
# 0.19.0
|
||||
|
||||
* Added instance Tags. Instance owners can add and remove them
|
||||
|
|
|
@ -64,7 +64,7 @@ class Tags(Resource):
|
|||
def delete(self):
|
||||
'''Delete an instance's tag
|
||||
'''
|
||||
self.args = self.patch_parser.parse_args()
|
||||
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 the admin account")
|
||||
user = database.find_user_by_api_key(self.args.apikey)
|
||||
|
@ -75,9 +75,9 @@ class Tags(Resource):
|
|||
tags = [t.strip() for t in self.args.tags_csv.split(',')]
|
||||
for tag in tags:
|
||||
existing_tag = database.get_instance_tag(instance.id,tag)
|
||||
if not existing_tag:
|
||||
existing_tag
|
||||
db.session.delete(existing_tag)
|
||||
if existing_tag:
|
||||
db.session.delete(existing_tag)
|
||||
changed = True
|
||||
if changed:
|
||||
db.session.commit()
|
||||
return {"message": "Changed"},200
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FEDISEER_VERSION = "0.19.0"
|
||||
FEDISEER_VERSION = "0.19.1"
|
||||
SUPPORTED_SOFTWARE = {
|
||||
"lemmy",
|
||||
"mastodon",
|
||||
|
|
|
@ -486,7 +486,7 @@ def instance_has_flag(instance_id, flag_enum):
|
|||
def get_instance_tag(instance_id, tag: str):
|
||||
query = InstanceTag.query.filter(
|
||||
InstanceTag.instance_id == instance_id,
|
||||
InstanceTag.flag == tag,
|
||||
InstanceTag.tag == tag,
|
||||
)
|
||||
return query.first()
|
||||
|
||||
|
|
|
@ -33,5 +33,6 @@ However using the endorsement system, you can create a further customized whitel
|
|||
These are the people who made this software possible.
|
||||
|
||||
* [Db0](https://dbzer0.com) - Development and Maintenance.
|
||||
* [Rikudou](https://lemmings.world/u/rikudou) - GUI Development.
|
||||
|
||||
<a rel="me" href="https://botsin.space/@fediseer"></a>
|
Loading…
Reference in New Issue