@atproto/xrpc-server 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/xrpc-server",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
5
  "description": "atproto HTTP API (XRPC) server library",
6
6
  "keywords": [
@@ -25,7 +25,7 @@
25
25
  "zod": "^3.21.4",
26
26
  "@atproto/common": "^0.3.3",
27
27
  "@atproto/crypto": "^0.3.0",
28
- "@atproto/lexicon": "^0.3.0"
28
+ "@atproto/lexicon": "^0.3.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/express": "^4.17.13",
@@ -37,7 +37,7 @@
37
37
  "key-encoder": "^2.0.3",
38
38
  "multiformats": "^9.9.0",
39
39
  "@atproto/crypto": "^0.3.0",
40
- "@atproto/xrpc": "^0.4.0"
40
+ "@atproto/xrpc": "^0.4.1"
41
41
  },
42
42
  "scripts": {
43
43
  "test": "jest",
package/src/server.ts CHANGED
@@ -248,11 +248,9 @@ export class Server {
248
248
  }
249
249
 
250
250
  // handle rate limits
251
- if (consumeRateLimit) {
252
- const result = await consumeRateLimit(reqCtx)
253
- if (result instanceof RateLimitExceededError) {
254
- return next(result)
255
- }
251
+ const result = await consumeRateLimit(reqCtx)
252
+ if (result instanceof RateLimitExceededError) {
253
+ return next(result)
256
254
  }
257
255
 
258
256
  // run the handler