Commit 758391f6 authored by Caleb C. Sander's avatar Caleb C. Sander
Browse files

Fix #7

parent 81927b21
Showing with 10 additions and 7 deletions
+10 -7
......@@ -163,13 +163,13 @@ It is an error if a repository with this name already exists.
The request JSON has the following form:
```ts
interface NewRepositoryRequest {
{
name: string
}
```
If successful, the response JSON has the following form:
```ts
interface NewRepositoryResponse {
{
success: true
}
```
......@@ -182,7 +182,7 @@ It is an error if the repository doesn't exist or the commit does not exist in t
The request JSON has the following form:
```ts
interface FetchRequest {
{
// Repository name
name: string
// Last known commit ID.
......@@ -192,18 +192,21 @@ interface FetchRequest {
```
If successful, the response JSON has the following form:
```ts
interface FetchResponse {
{
success: true
// Commits after parentID up to HEAD.
// They must be ordered from oldest to newest.
commits: Commit[]
}
interface Commit {
```
where
```ts
type Commit = {
id: string
message: string
diffs: FileDiffs
}
interface FileDiffs {
type FileDiffs = {
// Map each filename to a diff for that file
[file: string]: Diff
}
......@@ -226,7 +229,7 @@ If there is a merge conflict, `mergeFileDiffs()` will throw an error, which you
The request JSON has the following form:
```ts
interface CommitRequest {
{
// Repository name
name: string
// Parent commit.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment