Skip to content

Commit

Permalink
Merge branch 'master' into support/160589-edit-display-brand-logo
Browse files Browse the repository at this point in the history
  • Loading branch information
satof3 committed Jan 29, 2025
2 parents f1adf7e + 068cf4b commit 3849425
Show file tree
Hide file tree
Showing 17 changed files with 438 additions and 146 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- release/**
- rc/**
- changeset-release/**
- mergify/merge-queue/**
- tmp-mergify/merge-queue/**
paths:
- .github/mergify.yml
- .github/workflows/ci-app.yml
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/reusable-app-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ jobs:
run: |
pnpm install --frozen-lockfile
- name: Cache/Restore dist
uses: actions/cache@v4
with:
path: |
**/.turbo
**/dist
**/node_modules/.cache/turbo
${{ github.workspace }}/apps/app/.next
key: dist-app-prod-${{ runner.OS }}-node${{ inputs.node-version }}-${{ github.sha }}
restore-keys: |
dist-app-prod-${{ runner.OS }}-node${{ inputs.node-version }}-
- name: Build
working-directory: ./apps/app
run: |
Expand Down Expand Up @@ -315,7 +303,9 @@ jobs:
pnpm install --frozen-lockfile
- name: Merge into HTML Report
run: pnpm playwright merge-reports --reporter html ./all-blob-reports
run: |
mkdir -p all-blob-reports
pnpm playwright merge-reports --reporter html ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v4
Expand Down
15 changes: 15 additions & 0 deletions apps/app/src/server/routes/apiv3/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ module.exports = (crowi) => {
const activityEvent = crowi.event('activity');
const addActivity = generateAddActivityMiddleware(crowi);

/**
* @swagger
* /logout:
* post:
* tags: [Users]
* security:
* - cookieAuth: []
* summary: Logout user
* description: Logout the currently authenticated user
* responses:
* 200:
* description: Successfully logged out
* 500:
* description: Internal server error
*/
router.post('/', addActivity, async(req, res) => {
req.session.destroy();

Expand Down
100 changes: 88 additions & 12 deletions apps/app/src/server/routes/apiv3/markdown-setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@ const validator = {
*
* components:
* schemas:
* MarkdownParams:
* description: MarkdownParams
* type: object
* properties:
* isEnabledLinebreaks:
* type: boolean
* description: enable lineBreak
* isEnabledLinebreaksInComments:
* type: boolean
* description: enable lineBreak in comment
* adminPreferredIndentSize:
* type: number
* description: preferred indent size
* isIndentSizeForced:
* type: boolean
* description: force indent size
* isEnabledXss:
* type: boolean
* description: enable xss
* xssOption:
* type: number
* description: number of xss option
* tagWhitelist:
* type: array
* description: array of tag whitelist
* items:
* type: string
* description: tag whitelist
* attrWhitelist:
* type: string
* description: attr whitelist
* LineBreakParams:
* description: LineBreakParams
* type: object
Expand All @@ -61,7 +92,7 @@ const validator = {
* description: XssParams
* type: object
* properties:
* isEnabledPrevention:
* isEnabledXss:
* type: boolean
* description: enable xss
* xssOption:
Expand All @@ -74,11 +105,18 @@ const validator = {
* type: string
* description: tag whitelist
* attrWhitelist:
* type: array
* description: array of attr whitelist
* items:
* type: string
* description: attr whitelist
* type: string
* description: attr whitelist
* IndentParams:
* description: IndentParams
* type: object
* properties:
* adminPreferredIndentSize:
* type: number
* description: preferred indent size
* isIndentSizeForced:
* type: boolean
* description: force indent size
*/

module.exports = (crowi) => {
Expand All @@ -94,9 +132,10 @@ module.exports = (crowi) => {
* /markdown-setting:
* get:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: getMarkdownSetting
* summary: /markdown-setting
* description: Get markdown parameters
* summary: Get markdown parameters
* responses:
* 200:
* description: params of markdown
Expand All @@ -107,6 +146,7 @@ module.exports = (crowi) => {
* markdownParams:
* type: object
* description: markdown params
* $ref: '#/components/schemas/MarkdownParams'
*/
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
const markdownParams = {
Expand All @@ -129,9 +169,10 @@ module.exports = (crowi) => {
* /markdown-setting/lineBreak:
* put:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: updateLineBreakMarkdownSetting
* summary: /markdown-setting/lineBreak
* description: Update lineBreak setting
* summary: Update lineBreak setting
* requestBody:
* required: true
* content:
Expand All @@ -144,7 +185,11 @@ module.exports = (crowi) => {
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/LineBreakParams'
* type: object
* properties:
* lineBreaksParams:
* type: object
* $ref: '#/components/schemas/LineBreakParams'
*/
router.put('/lineBreak', loginRequiredStrictly, adminRequired, addActivity, validator.lineBreak, apiV3FormValidator, async(req, res) => {

Expand Down Expand Up @@ -173,6 +218,35 @@ module.exports = (crowi) => {

});

/**
* @swagger
*
* /markdown-setting/indent:
* put:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: updateIndentMarkdownSetting
* summary: Update indent setting
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/IndentParams'
* responses:
* 200:
* description: Succeeded to update indent setting
* content:
* application/json:
* schema:
* type: object
* properties:
* indentParams:
* type: object
* description: indent params
* $ref: '#/components/schemas/IndentParams'
*/
router.put('/indent', loginRequiredStrictly, adminRequired, addActivity, validator.indent, apiV3FormValidator, async(req, res) => {

const requestIndentParams = {
Expand Down Expand Up @@ -206,8 +280,10 @@ module.exports = (crowi) => {
* /markdown-setting/xss:
* put:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: updateXssMarkdownSetting
* summary: /markdown-setting/xss
* summary: Update XSS setting
* description: Update xss
* requestBody:
* required: true
Expand Down
3 changes: 3 additions & 0 deletions apps/app/src/server/routes/apiv3/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ module.exports = (crowi) => {
* application/json:
* schema:
* properties:
* ok:
* type: boolean
* description: whether the request is succeeded
* collections:
* type: array
* items:
Expand Down
Loading

0 comments on commit 3849425

Please sign in to comment.