Page MenuHomePhorge

D15070.1765054895.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D15070.1765054895.diff

diff --git a/keyserver/src/socket/socket.js b/keyserver/src/socket/socket.js
--- a/keyserver/src/socket/socket.js
+++ b/keyserver/src/socket/socket.js
@@ -15,7 +15,7 @@
} from 'lib/shared/timeouts.js';
import { mostRecentUpdateTimestamp } from 'lib/shared/update-utils.js';
import { hasMinCodeVersion } from 'lib/shared/version-utils.js';
-import { endpointIsSocketSafe } from 'lib/types/endpoints.js';
+import { endpointIsSocketSafe, endpoints } from 'lib/types/endpoints.js';
import { redisMessageTypes, type RedisMessage } from 'lib/types/redis-types.js';
import {
serverRequestTypes,
@@ -126,7 +126,7 @@
),
id: t.Number,
payload: tShape({
- endpoint: t.String,
+ endpoint: t.enums.of(endpoints),
input: t.maybe(t.Object),
}),
}),
diff --git a/lib/types/endpoints.js b/lib/types/endpoints.js
--- a/lib/types/endpoints.js
+++ b/lib/types/endpoints.js
@@ -1,5 +1,7 @@
// @flow
+import { values } from '../utils/objects.js';
+
export type APIRequest = {
endpoint: Endpoint,
input?: Object,
@@ -144,3 +146,11 @@
export function endpointIsSocketOnly(endpoint: Endpoint): boolean {
return socketOnlyEndpointSet.has(endpoint);
}
+
+export const endpoints: $ReadOnlyArray<Endpoint> = [
+ ...values(sessionChangingEndpoints),
+ ...values(uploadEndpoints),
+ ...values(largeDataFetchEndpoints),
+ ...values(socketOnlyEndpoints),
+ ...values(httpPreferredEndpoints),
+];

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 9:01 PM (18 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840838
Default Alt Text
D15070.1765054895.diff (1 KB)

Event Timeline