Skip to content

Commit a35e7c6

Browse files
authored
feat: add bonding pool and related content types (#45)
* feat: add bonding pool and related content types * chore: update readme with instructions to build before running dev * chore: bump version to 0.7.0
1 parent 93ffb1c commit a35e7c6

File tree

15 files changed

+17708
-8325
lines changed

15 files changed

+17708
-8325
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This project is a Content Management System for the [cow.fi](https://cow.fi).
55
> It is an instance of Strapi, a headless CMS.
66
77
# API
8-
Swagger Docs: https://cms.cow.fi/swagger.html
98

9+
Swagger Docs: <https://cms.cow.fi/swagger.html>
1010

1111
# 👨‍💻 Develop
1212

@@ -16,8 +16,8 @@ Some requiremets are:
1616
- Yarn
1717
- PostgreSQL (optional), for local dev is easier to use sqlite3 (the default). Alternatively you can use PostgreSQL
1818

19-
2019
## Run locally using sqlite3
20+
2121
The CMS relies on a database. The simplest is to use `Sqlite` for development.
2222

2323
You actually don't need to do anything for this! If you run the project with `yarn dev`, it will automatically create a sqlite database in `data/sqlite.db`
@@ -27,8 +27,8 @@ yarn dev
2727
```
2828

2929
Then visit:
30-
* **Admin**: http://localhost:1337/admin
3130

31+
- **Admin**: <http://localhost:1337/admin>
3232

3333
On its basic setup, you don't need to add any configuration parameter, however you might want to do so. You can do this by creating a `.env` file.
3434

@@ -37,7 +37,6 @@ On its basic setup, you don't need to add any configuration parameter, however y
3737
cp .env.example .env
3838
```
3939

40-
4140
## Dev locally using PostreSQL
4241

4342
If you want to use `PostgreSQL` (instead of `sqlite3`), you need to install it first:
@@ -55,7 +54,7 @@ cp .env.example .env
5554

5655
Edit the .env file and set the database connection
5756

58-
- See https://docs.strapi.io/dev-docs/configurations/environment
57+
- See <https://docs.strapi.io/dev-docs/configurations/environment>
5958

6059
To start with the new database, you simply start the dev server:
6160

@@ -65,6 +64,8 @@ yarn dev
6564

6665
# 👷‍♀️ Build
6766

67+
Before running the server for the first time, you need to build it:
68+
6869
```bash
6970
yarn build
7071
```
@@ -107,6 +108,7 @@ yarn strapi help
107108
```
108109

109110
# Library
111+
110112
This project also exposes a library that can be used to interact with the CMS API.
111113

112114
To build the library, run:
@@ -117,4 +119,4 @@ npm version minor
117119

118120
# Build and Publish to NPM
119121
./scripts/publish-lib.sh
120-
```
122+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cowprotocol/cms-parent",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "Cow Protocol CMS",
55
"private": true,
66
"license": "(MIT OR Apache-2.0)",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"kind": "collectionType",
3+
"collectionName": "bonding_pools",
4+
"info": {
5+
"singularName": "bonding-pool",
6+
"pluralName": "bonding-pools",
7+
"displayName": "Bonding Pool"
8+
},
9+
"options": {
10+
"draftAndPublish": false
11+
},
12+
"pluginOptions": {},
13+
"attributes": {
14+
"name": {
15+
"type": "string",
16+
"required": true,
17+
"unique": true
18+
},
19+
"solver_bonding_pools": {
20+
"type": "relation",
21+
"relation": "oneToMany",
22+
"target": "api::solver-bonding-pool.solver-bonding-pool",
23+
"mappedBy": "bonding_pool"
24+
}
25+
}
26+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* bonding-pool controller
3+
*/
4+
5+
import { factories } from '@strapi/strapi'
6+
7+
export default factories.createCoreController('api::bonding-pool.bonding-pool');

0 commit comments

Comments
 (0)