Skip to content

Commit

Permalink
chore: rebuild handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
tosaken1116 committed Apr 13, 2024
1 parent 4c918cc commit 4f68527
Show file tree
Hide file tree
Showing 8 changed files with 779 additions and 1,049 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ src/api/**/*

msw/

public/mockServiceWorker.js
public/mockServiceWorker.js

protoc-plugin/
10 changes: 5 additions & 5 deletions msw/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assetsServiceHandlers } from './handlers/AssetsService/handlers.ts'
import { authServiceHandlers } from './handlers/AuthService/handlers.ts'
import { tagsServiceHandlers } from './handlers/TagsService/handlers.ts'
import { usersServiceHandlers } from './handlers/UsersService/handlers.ts'
import { worksServiceHandlers } from './handlers/WorksService/handlers.ts'
import { assetsServiceHandlers } from './handlers/AssetsService/handlers'
import { authServiceHandlers } from './handlers/AuthService/handlers'
import { tagsServiceHandlers } from './handlers/TagsService/handlers'
import { usersServiceHandlers } from './handlers/UsersService/handlers'
import { worksServiceHandlers } from './handlers/WorksService/handlers'
export const handlers = [
...assetsServiceHandlers,
...authServiceHandlers,
Expand Down
2 changes: 1 addition & 1 deletion msw/handlers/AssetsService/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { http, HttpResponse } from 'msw'
const ApiV1AssetsPostHandler = http.post('/api/v1/assets',() => {
return HttpResponse.json({
id:'811ffd91-3ef0-41ed-a0f5-ee83d6ae8a3e',
id:'081b6849-880d-4d41-a616-703771ba0153',
})
})
const ApiV1AssetsIdDeleteHandler = http.delete('/api/v1/assets/{id}',() => {
Expand Down
18 changes: 9 additions & 9 deletions msw/handlers/AuthService/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const ApiV1AuthDiscordCallbackGetHandler = http.get('/api/v1/auth/discord/callba
const ApiV1AuthTokenPostHandler = http.post('/api/v1/auth/token',() => {
return HttpResponse.json({
expired_at:'',
refresh_token:'y{l{hijtqjtzgvxp',
access_token:'y{l{hijtqjtzgvxp',
refresh_token:'~kisrg}{a|gfh',
access_token:'~kisrg}{a|gfh',
})
})
const ApiV1AuthDiscordGetHandler = http.get('/api/v1/auth/discord',() => {
Expand All @@ -21,13 +21,13 @@ const ApiV1AuthDiscordGetHandler = http.get('/api/v1/auth/discord',() => {
})
const ApiV1AuthSignUpPostHandler = http.post('/api/v1/auth/sign_up',() => {
return HttpResponse.json({
id:'01bad699-054d-45ef-aa8f-86ba01ef5fb4',
name:'Asa Gulgowski',
display_name:'Asa Gulgowski',
avatar_url:'https://www.wed.biz/xrw-pnx',
profile:'aut sunt dignissimos amet dicta voluptates cupiditate aut numquam dolorem minima numquam culpa iure voluptatibus consequuntur ipsa animi quo dolores eum voluptatum aut repellat voluptas et fugiat adipisci ut ipsam dolores vero molestiae doloribus eos est tempore odio illum est.',
twitter_id:'103c831d-0c5b-4576-9c0a-c86b334ab11e',
github_id:'17ff1139-628e-4b85-9c4c-1de9e8c4560f',
id:'74517e6a-4ee0-43aa-b82c-f6e8ccf73c1b',
name:'Mr. Augustus Kihn V',
display_name:'Mr. Augustus Kihn V',
avatar_url:'http://www.fyu.net/oam-h',
profile:'id sed adipisci accusamus et ut illo impedit eaque doloremque a deleniti illum officiis commodi ipsum magnam dolor possimus voluptas perferendis ab voluptas dolorem aut ut magni repellat magni est accusantium quia dignissimos sit ea mollitia inventore vitae velit et.',
twitter_id:'10798924-01ba-4baf-b217-ae4bf047a1a9',
github_id:'384a44a4-3955-4fa1-aedd-15be60032519',
created_at:'2021-09-01T00:00:00Z',
updated_at:'2021-09-01T00:00:00Z',
})
Expand Down
35 changes: 20 additions & 15 deletions msw/handlers/TagsService/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,42 @@ const ApiV1TagsGetHandler = http.get('/api/v1/tags',() => {
return HttpResponse.json({
tags:[
{
id:'35701d5c-a7ce-4f16-8eb6-397840646007',
name:'Asa Gulgowski',
color:'#C44549',
id:'c143d2a2-1522-4936-b511-c84f892d6222',
name:'Mr. Augustus Kihn V',
color:'#AD0A61',
},
{
id:'95c20d45-b46a-427e-a782-15ada4e9056b',
name:'Asa Gulgowski',
color:'#C44549',
id:'8eb89ccc-db27-47d3-b4a6-dafaec94b96d',
name:'Mr. Augustus Kihn V',
color:'#AD0A61',
},
{
id:'70cc0f48-fda7-49b2-889d-599cb8f1c4ed',
name:'Mr. Augustus Kihn V',
color:'#AD0A61',
},
],
})
})
const ApiV1TagsPostHandler = http.post('/api/v1/tags',() => {
return HttpResponse.json({
id:'efae644f-51cf-4b2c-965d-a3f7243a12b5',
name:'Asa Gulgowski',
color:'#C44549',
id:'f30b55d9-7bcd-494a-baf6-79aa40207924',
name:'Mr. Augustus Kihn V',
color:'#AD0A61',
})
})
const ApiV1TagsTagIdGetHandler = http.get('/api/v1/tags/{tag_id}',() => {
return HttpResponse.json({
id:'a8f94ea5-c492-44b8-8370-1acfacad805a',
name:'Asa Gulgowski',
color:'#C44549',
id:'0063b8fa-d798-47c2-931e-aebcf455009b',
name:'Mr. Augustus Kihn V',
color:'#AD0A61',
})
})
const ApiV1TagsTagIdPutHandler = http.put('/api/v1/tags/{tag_id}',() => {
return HttpResponse.json({
id:'34b9c70c-0c92-4934-899a-617617071798',
name:'Asa Gulgowski',
color:'#C44549',
id:'4d700716-f3ae-44f5-a326-52b1d85fb5d5',
name:'Mr. Augustus Kihn V',
color:'#AD0A61',
})
})
const ApiV1TagsTagIdDeleteHandler = http.delete('/api/v1/tags/{tag_id}',() => {
Expand Down
Loading

0 comments on commit 4f68527

Please sign in to comment.