Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relinquish OAuth responsibilities #19

Merged
merged 11 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ env:
# worker globals/secrets
CLOUDFLARE_NAMESPACEID: ${{ secrets.CLOUDFLARE_NAMESPACEID }}
CLOUDFLARE_NAMESPACEID_DOCS: ${{ secrets.CLOUDFLARE_NAMESPACEID_DOCS }}
GITHUB_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }}
GITHUB_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }}

jobs:
deploy:
Expand Down
2 changes: 0 additions & 2 deletions cfw.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ module.exports = {
globals: {
DATAB: `KV:${VARS.CLOUDFLARE_NAMESPACEID}`,
DOCS: `KV:${VARS.CLOUDFLARE_NAMESPACEID_DOCS}`,
GITHUB_CLIENT_ID: `ENV:${VARS.GITHUB_CLIENT_ID}`,
GITHUB_CLIENT_SECRET: `SECRET:${VARS.GITHUB_CLIENT_SECRET}`,
}
}
12 changes: 0 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Router } from 'worktop';
import * as CORS from 'worktop/cors';
import * as Cache from 'worktop/cache';
import * as Gists from './routes/gists';
import * as Todos from './routes/todos';
import * as Auth from './routes/auth';
import * as Docs from './routes/docs';

const API = new Router();
Expand All @@ -12,16 +10,6 @@ API.prepare = CORS.preflight({
maxage: 3600
});

API.add('GET', '/auth/login', Auth.login);
API.add('GET', '/auth/callback', Auth.callback);
API.add('GET', '/auth/logout', Auth.logout);

API.add('GET', '/gists', Gists.list);
API.add('POST', '/gists', Gists.create);
API.add('GET', '/gists/:uid', Gists.show);
API.add('PUT', '/gists/:uid', Gists.update);
API.add('DELETE', '/gists/:uid', Gists.destroy);

API.add('GET', '/todos/:userid', Todos.list);
API.add('POST', '/todos/:userid', Todos.create);
API.add('PATCH', '/todos/:userid/:uid', Todos.update);
Expand Down
21 changes: 0 additions & 21 deletions src/models/docs.ts

This file was deleted.

110 changes: 0 additions & 110 deletions src/models/gist.ts

This file was deleted.

89 changes: 0 additions & 89 deletions src/models/session.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/models/todolist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function insert(userid: GuestID, text: string) {
const list = await lookup(userid) || [];

const todo: Todo = {
uid: keys.gen(36),
uid: keys.uid(36),
created_at: Date.now(),
text,
done: false
Expand Down
71 changes: 0 additions & 71 deletions src/models/user.ts

This file was deleted.

Loading