This commit is contained in:
Aevann1 2022-02-13 04:04:57 +02:00
parent 8dde94fb29
commit 8cfc862d03
2 changed files with 23 additions and 51 deletions

View file

@ -139,7 +139,7 @@ def admin_app_approve(v, aid):
def admin_app_revoke(v, aid):
app = g.db.query(OauthApp).filter_by(id=aid).one_or_none()
if app.id:
if app:
for auth in g.db.query(ClientAuth).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
send_repeatable_notification(app.author.id, f"Your application `{app.app_name}` has been revoked.")
@ -165,6 +165,7 @@ def admin_app_reject(v, aid):
app = g.db.query(OauthApp).filter_by(id=aid).one_or_none()
if app:
for auth in g.db.query(ClientAuth).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
send_repeatable_notification(app.author.id, f"Your application `{app.app_name}` has been rejected.")

View file

@ -1,45 +1,16 @@
INSERT INTO public.users (username, original_username) VALUES
('Drama','Drama'),
('AutoJanny','AutoJanny'),
('Snappy','Snappy'),
('longpostbot','longpostbot'),
('zozbot','zozbot'),
('AutoPoller','AutoPoller'),
('AutoBetter','AutoBetter'),
('AutoChoice','AutoChoice');
insert into public.award_relationships(id,user_id,kind) values(1,1,'shit');
INSERT INTO public.users (
id, username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private,
unban_utc, original_username, customtitle, defaultsorting, defaultsortingcomments, defaulttime, namecolor, titlecolor, profileurl, bannerurl,
customtitleplain, theme, themecolor, changelogsub, oldreddit, css, profilecss, coins, agendaposter, suicide_utc,
post_count, comment_count, background, verified, truecoins
) VALUES (1, 'Drama', '', 0, 0, true, true, '', '', 0, false,
0, 'Drama', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', '', '',
'', 'dark', 'ff66ac', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(2, 'AutoJanny', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoJanny', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', '', '',
'', 'dark', 'ff66ac', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(3, 'Snappy', '', 0, 0, true, true, '', '', 0, false,
0, 'Snappy', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(4, 'longpostbot', '', 0, 0, true, true, '', '', 0, false,
0, 'longpostbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(5, 'zozbot', '', 0, 0, true, true, '', '', 0, false,
0, 'zozbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(6, 'AutoPoller', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoPoller', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(7, 'AutoBetter', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoBetter', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0);
(8, 'AutoChoice', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoChoice', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0);
SELECT pg_catalog.setval('public.users_id_seq', 7, true);
INSERT INTO public.badge_defs VALUES
(1,'Alpha User','Joined during open alpha'),
(2,'Verified Email','Verified Email'),