Skip to content

Commit

Permalink
feat: add author comp
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Jan 20, 2023
1 parent 420789e commit 2ee61de
Show file tree
Hide file tree
Showing 16 changed files with 7,993 additions and 5,318 deletions.
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"prettier.enable": false,
// "prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
// "source.fixAll": true
},
"files.associations": {
"*.css": "postcss"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.requireConfig": true,
// "editor.formatOnSave": true,
// "editor.defaultFormatter": "esbenp.prettier-vscode",
// "prettier.requireConfig": true,
"eslint.enable": true,
"cSpell.words": [
"nuxtjs"
Expand Down
Binary file modified backend/.tmp/data.db
Binary file not shown.
32 changes: 32 additions & 0 deletions backend/src/api/author/content-types/author/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"kind": "collectionType",
"collectionName": "authors",
"info": {
"singularName": "author",
"pluralName": "authors",
"displayName": "author",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"scr": {
"type": "text"
},
"img": {
"type": "string"
},
"uid": {
"type": "uid",
"targetField": "name"
},
"rank": {
"type": "integer"
}
}
}
9 changes: 9 additions & 0 deletions backend/src/api/author/controllers/author.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* author controller
*/

const { createCoreController } = require('@strapi/strapi').factories;

module.exports = createCoreController('api::author.author');
Loading

0 comments on commit 2ee61de

Please sign in to comment.