Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit d4c7f09

Browse files
committed
feat: add resource usage route
1 parent ecf87db commit d4c7f09

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

polyproto/core/routes/rawr.tsp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,25 @@ namespace polyproto.core.Routes.ResourceAddressingWithRelativeRoots {
229229
// TODO: Information about how much storage space you have still
230230
// remaining is likely a good idea for a route.
231231
}
232+
233+
/**
234+
* Get information about how much storage you are allowed to use, and see how much storage you
235+
* are currently using.
236+
*/
237+
@route("/usage")
238+
@get
239+
@added(Version.`v1.0-beta.1`)
240+
@summary("Retrieve information about your storage usage")
241+
op getStorageLimitInfo(): {
242+
@statusCode _s: 200;
243+
@body _b: {
244+
@doc("How many bytes of storage you are allowed to upload in total")
245+
limit: uint64;
246+
247+
@doc("How many bytes of storage you are currently using")
248+
used: uint64;
249+
};
250+
};
232251
}
233252

234253
// rawr x3

0 commit comments

Comments
 (0)