From b014504119f97198e526d16fdb4e8cc49cb85656 Mon Sep 17 00:00:00 2001 From: nekobit Date: Sat, 22 Oct 2022 05:52:24 +0000 Subject: [PATCH] OAuth table FossilOrigin-Name: 4b9542fdcfe6aad29dcc365350057439f6edafd2e97a1a46fbcc165e0e9f111c --- src/database/sqlite/sqlite.cpp | 31 +++++++++++++++++++++++++++++++ src/protocol/oauth/oauth.cpp | 1 - 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/database/sqlite/sqlite.cpp b/src/database/sqlite/sqlite.cpp index fec7203..e1bda03 100644 --- a/src/database/sqlite/sqlite.cpp +++ b/src/database/sqlite/sqlite.cpp @@ -265,6 +265,37 @@ CREATE TABLE IF NOT EXISTS user_activities ( FOREIGN KEY(usee) REFERENCES users(id) ) )sql", + + R"sql( +CREATE TABLE IF NOT EXISTS applications ( + id INTEGER PRIMARY KEY ASC, + client_name TEXT, + client_id TEXT NOT NULL, + client_secret TEXT NOT NULL, + app_website TEXT, + created_at DATETIME, + updated_at DATETIME, +) +)sql", + + R"sql( +CREATE TABLE IF NOT EXISTS applications ( + id INTEGER PRIMARY KEY ASC, + client_name TEXT, + client_id TEXT NOT NULL, + client_secret TEXT NOT NULL, + app_website TEXT, + created_at DATETIME, + updated_at DATETIME, +) +)sql", + +// R"sql( +// CREATE TABLE IF NOT EXISTS statuses ( +// id INTEGER PRIMARY KEY ASC, + +// ) +// )sql", }; char* err; diff --git a/src/protocol/oauth/oauth.cpp b/src/protocol/oauth/oauth.cpp index b1e8ac3..0cd06a3 100644 --- a/src/protocol/oauth/oauth.cpp +++ b/src/protocol/oauth/oauth.cpp @@ -43,7 +43,6 @@ HTTP::Response Route::oauth_authorize(std::any& args, //DESTRUCT_WORMHOLE_ARGS(args); - // Sorry :-) return HTTP::Response{ "{}", HTTP::MIME::JSON }; }