MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / identifySyncType

Function identifySyncType

apps/web/services/accounts/sync.ts:135–150  ·  view source on GitHub ↗
(
  account:
    | (accounts & {
        slackAuthorizations: slackAuthorizations[];
        discordAuthorizations: discordAuthorizations[];
      })
    | null
)

Source from the content-addressed store, hash-verified

133}
134
135function identifySyncType(
136 account:
137 | (accounts & {
138 slackAuthorizations: slackAuthorizations[];
139 discordAuthorizations: discordAuthorizations[];
140 })
141 | null
142) {
143 if (account?.discordAuthorizations.length) {
144 return discordSync;
145 }
146 if (account?.slackAuthorizations.length) {
147 return slackSync;
148 }
149 throw 'authorization missing';
150}
151
152export async function syncJob({
153 account_id,

Callers 1

syncJobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected