feat: add simple jwt middleware and update oauth handlers
All checks were successful
Backend ci / build (push) Successful in 3m44s
All checks were successful
Backend ci / build (push) Successful in 3m44s
This commit is contained in:
@@ -6,5 +6,13 @@ CREATE TABLE IF NOT EXISTS posts(
|
||||
title TEXT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
CREATED_AT DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS users(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
email TEXT,
|
||||
github_id TEXT,
|
||||
github_login TEXT,
|
||||
avatar_url TEXT
|
||||
);
|
||||
`
|
||||
|
||||
@@ -17,3 +17,11 @@ type PostCreate struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int `db:"id"`
|
||||
Email string `db:"email"`
|
||||
GithubID string `db:"github_id"`
|
||||
GithubLogin string `db:"github_login"`
|
||||
AvatarURL string `db:"avatar_url"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user