Skip to content

Commit a885de0

Browse files
authored
Merge pull request #253 from KenEucker/develop
Adds Search
2 parents 25fbb96 + 6b640ec commit a885de0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+526
-352
lines changed

functions/achievements-background.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Handler } from '@netlify/functions'
22
import BikeTagClient from 'biketag'
33
import { Achievement, Game, Player, Tag } from 'biketag/dist/common/schema'
4-
import { getSupportedGames } from '../src/common/utils'
4+
import { getSupportedGames } from '../src/common'
5+
import { getBikeTagClientOpts } from './common'
56
import { HttpStatusCode } from './common/constants'
6-
import { getBikeTagClientOpts } from './common/methods'
77
import { BackgroundProcessResults } from './common/types'
88

99
export const assignAchievements = async (): Promise<BackgroundProcessResults> => {

functions/achievements.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag'
33
import { getAchievementsPayload } from 'biketag/dist/common/payloads'
44
import { Game } from 'biketag/dist/common/schema'
55
import request from 'request'
6-
import { getBikeTagClientOpts, getPayloadOpts } from './common/methods'
6+
import { getBikeTagClientOpts, getPayloadOpts } from './common'
77

88
const achievementsHandler: Handler = async (event) => {
99
const biketagOpts = getBikeTagClientOpts(

functions/ambassadors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag'
33
import { getAmbassadorsPayload } from 'biketag/dist/common/payloads'
44
import { Game } from 'biketag/dist/common/schema'
55
import request from 'request'
6-
import { getBikeTagClientOpts, getPayloadOpts } from './common/methods'
6+
import { getBikeTagClientOpts, getPayloadOpts } from './common'
77

88
const ambassadorsHandler: Handler = async (event) => {
99
const biketagOpts = getBikeTagClientOpts(

functions/approve.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { Handler } from '@netlify/functions'
22
import { BikeTagClient } from 'biketag'
33
import { Game } from 'biketag/dist/common/schema'
44
import request from 'request'
5-
import { HttpStatusCode } from './common/constants'
65
import {
7-
acceptCorsHeaders,
8-
getActiveQueueForGame,
9-
getBikeTagClientOpts,
10-
getPayloadOpts,
11-
getProfileAuthorization,
12-
setNewBikeTagPost,
13-
} from './common/methods'
6+
acceptCorsHeaders,
7+
getActiveQueueForGame,
8+
getBikeTagClientOpts,
9+
getPayloadOpts,
10+
getProfileAuthorization,
11+
setNewBikeTagPost,
12+
} from './common'
13+
import { HttpStatusCode } from './common/constants'
1414

1515
const approveHandler: Handler = async (event) => {
1616
/// Bailout on OPTIONS requests

functions/authorize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { builder, Handler } from '@netlify/functions'
22
import { BikeTagClient } from 'biketag'
33
import request from 'request'
4+
import { getBikeTagClientOpts, getBikeTagHash, getPayloadOpts } from './common'
45
import { HttpStatusCode } from './common/constants'
5-
import { getBikeTagClientOpts, getBikeTagHash, getPayloadOpts } from './common/methods'
66

77
const authorizeHandler: Handler = async (event) => {
88
const {

functions/autopost-background.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { Handler } from '@netlify/functions'
22
import BikeTagClient from 'biketag'
33
import { Game } from 'biketag/dist/common/schema'
44
import request from 'request'
5-
import { HttpStatusCode } from './common/constants'
65
import {
7-
getActiveQueueForGame,
8-
getBikeTagClientOpts,
9-
getWinningTagForCurrentRound,
10-
setNewBikeTagPost,
11-
} from './common/methods'
6+
getActiveQueueForGame,
7+
getBikeTagClientOpts,
8+
getWinningTagForCurrentRound,
9+
setNewBikeTagPost,
10+
} from './common'
11+
import { HttpStatusCode } from './common/constants'
1212
import { BackgroundProcessResults } from './common/types'
1313

1414
export const autoPostNewBikeTags = async (): Promise<BackgroundProcessResults> => {

functions/autopost-clear.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Handler } from '@netlify/functions'
22
import BikeTagClient from 'biketag'
33
import { Game } from 'biketag/dist/common/schema'
4-
import { HttpStatusCode } from './common/constants'
54
import {
65
archiveAndClearQueue,
76
getActiveQueueForGame,
87
getBikeTagClientOpts,
98
isRequestAllowed,
10-
} from './common/methods'
9+
} from './common'
10+
import { HttpStatusCode } from './common/constants'
1111
import { BackgroundProcessResults } from './common/types'
1212

1313
export const autoClearQueue = async (event): Promise<BackgroundProcessResults> => {

functions/autopost-notify.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Handler } from '@netlify/functions'
22
import BikeTagClient from 'biketag'
33
import { Game } from 'biketag/dist/common/schema'
4-
import { HttpStatusCode } from './common/constants'
54
import {
6-
getBikeTagClientOpts,
7-
isRequestAllowed,
8-
sendNewBikeTagNotifications,
9-
} from './common/methods'
5+
getBikeTagClientOpts,
6+
isRequestAllowed,
7+
sendNewBikeTagNotifications,
8+
} from './common'
9+
import { HttpStatusCode } from './common/constants'
1010
import { BackgroundProcessResults } from './common/types'
1111

1212
export const autoNotifyNewBikeTagPosted = async (event): Promise<BackgroundProcessResults> => {

functions/common/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './constants'
2+
export * from './methods'
3+
export * from './types'
4+

functions/common/methods.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import nodemailer from 'nodemailer'
1414
import { extname, join } from 'path'
1515
import qs from 'qs'
1616
import request from 'request'
17-
import { BikeTagProfile } from '../../src/common/types'
1817
import {
1918
getDomainInfo,
2019
getImgurImageSized,
2120
getTagDate,
2221
isAuthenticationEnabled,
23-
} from '../../src/common/utils'
22+
} from '../../src/common'
23+
import { BikeTagProfile } from '../../src/common/types'
2424
import { ErrorMessage, HttpStatusCode } from './constants'
2525
import { BackgroundProcessResults, activeQueue } from './types'
2626

0 commit comments

Comments
 (0)