aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pysite/migrations/tables/oauth_data/__init__.py0
-rw-r--r--pysite/migrations/tables/oauth_data/v1.py3
-rw-r--r--pysite/views/api/bot/user.py4
-rw-r--r--templates/main/navigation.html16
4 files changed, 16 insertions, 7 deletions
diff --git a/pysite/migrations/tables/oauth_data/__init__.py b/pysite/migrations/tables/oauth_data/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pysite/migrations/tables/oauth_data/__init__.py
diff --git a/pysite/migrations/tables/oauth_data/v1.py b/pysite/migrations/tables/oauth_data/v1.py
new file mode 100644
index 00000000..8448d8e5
--- /dev/null
+++ b/pysite/migrations/tables/oauth_data/v1.py
@@ -0,0 +1,3 @@
+def run(db, table, table_obj):
+ db.run(db.query(table).index_create("snowflake"))
+ db.run(db.query(table).index_wait("snowflake"))
diff --git a/pysite/views/api/bot/user.py b/pysite/views/api/bot/user.py
index 077991f5..58963682 100644
--- a/pysite/views/api/bot/user.py
+++ b/pysite/views/api/bot/user.py
@@ -52,7 +52,7 @@ class UserView(APIView, DBMixin):
all_oauth_data = self.db.run(self.db.query(self.oauth_table_name), coerce=list)
for item in all_oauth_data:
- if item["id"] not in user_ids:
+ if item["snowflake"] not in user_ids:
self.db.delete(self.oauth_table_name, item["id"], durability="soft")
oauth_deletions += 1
@@ -94,7 +94,7 @@ class UserView(APIView, DBMixin):
oauth_deletions = self.db.run(
self.db.query(self.oauth_table_name)
- .get_all(*user_ids)
+ .get_all(*user_ids, index="snowflake")
.delete()
).get("deleted", 0)
diff --git a/templates/main/navigation.html b/templates/main/navigation.html
index a615468e..8333fd18 100644
--- a/templates/main/navigation.html
+++ b/templates/main/navigation.html
@@ -48,19 +48,19 @@
<li class="uk-nav-header"><a href="{{ url_for('main.info.index') }}">Information</a></li>
{% endif %}
- {% if current_page == "info/jams" %}
+ {% if current_page == "info.jams" %}
<li class="uk-active"><a href="{{ url_for('main.info.jams') }}">Code Jams</a></li>
{% else %}
<li><a href="{{ url_for('main.info.jams') }}">Code Jams</a></li>
{% endif %}
- {% if current_page == "info/help" %}
+ {% if current_page == "info.help" %}
<li class="uk-active"><a href="{{ url_for('main.info.help') }}">Getting Help</a></li>
{% else %}
<li><a href="{{ url_for('main.info.help') }}">Getting Help</a></li>
{% endif %}
- {% if current_page == "info/resources" %}
+ {% if current_page == "info.resources" %}
<li class="uk-active"><a href="{{ url_for('main.info.resources') }}">Resources</a></li>
{% else %}
<li><a href="{{ url_for('main.info.resources') }}">Resources</a></li>
@@ -72,19 +72,25 @@
<li class="uk-nav-header"><a href="{{ url_for('main.about.index') }}">About</a></li>
{% endif %}
- {% if current_page == "about/partners" %}
+ {% if current_page == "about.partners" %}
<li class="uk-active"><a href="{{ url_for('main.about.partners') }}">Partners</a></li>
{% else %}
<li><a href="{{ url_for('main.about.partners') }}">Partners</a></li>
{% endif %}
- {% if current_page == "about/rules" %}
+ {% if current_page == "about.rules" %}
<li class="uk-active"><a href="{{ url_for('main.about.rules') }}">Server Rules</a></li>
{% else %}
<li><a href="{{ url_for('main.about.rules') }}">Server Rules</a></li>
{% endif %}
<li class="uk-nav-divider"></li>
+
+ {% if current_page.startswith("about.privacy") %}
+ <li class="uk-active"><a href="{{ url_for('main.about.privacy') }}">Privacy</a></li>
+ {% else %}
+ <li><a href="{{ url_for('main.about.privacy') }}">Privacy</a></li>
+ {% endif %}
</ul>
</div>
</li>