Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-08-30 23:35:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6f8f8b9145a88e378fb4c4d8ddae1bc3e6d9b621
6f8f8b91
1 parent
b48a05ab
remove unnecessary files
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
70 deletions
back/src/api/Room/Room.js
back/src/api/Room/createRoom/createRoom.graphql
back/src/api/Room/createRoom/createRoom.js
back/src/api/Room/getRoomByName/getRoomByName.graphql
back/src/api/Room/getRoomByName/getRoomByName.js
back/src/api/Room/getRooms/getRooms.graphql
back/src/api/Room/getRooms/getRooms.js
back/src/api/Room/Room.js
deleted
100644 → 0
View file @
b48a05a
import
{
prisma
}
from
"../../utils"
;
export
default
{
Room
:
{
categories
:
(
parent
)
=>
prisma
.
room
.
findOne
({
where
:
{
id
:
parent
.
id
}
}).
categories
(),
messages
:
(
parent
)
=>
prisma
.
room
.
findOne
({
where
:
{
id
:
parent
.
id
}
}).
messages
(),
participants
:
(
parent
)
=>
prisma
.
room
.
findOne
({
where
:
{
id
:
parent
.
id
}
}).
participants
(),
},
};
back/src/api/Room/createRoom/createRoom.graphql
deleted
100644 → 0
View file @
b48a05a
type Mutation {
createRoom(name: String!): Room!
}
back/src/api/Room/createRoom/createRoom.js
deleted
100644 → 0
View file @
b48a05a
import
{
prisma
,
isAuthenticated
}
from
"../../../utils"
;
export
default
{
Mutation
:
{
createRoom
:
async
(
_
,
args
,
{
request
})
=>
{
isAuthenticated
(
request
);
const
{
name
}
=
args
;
const
{
user
}
=
request
;
let
newRoom
;
if
(
name
!==
undefined
)
{
newRoom
=
await
prisma
.
room
.
create
({
data
:
{
name
,
participants
:
{
connect
:
{
id
:
user
.
id
,
},
},
},
});
}
return
newRoom
;
},
},
};
back/src/api/Room/getRoomByName/getRoomByName.graphql
deleted
100644 → 0
View file @
b48a05a
type Query {
getRoomByName(roomName: String!): Room!
}
back/src/api/Room/getRoomByName/getRoomByName.js
deleted
100644 → 0
View file @
b48a05a
import
{
prisma
,
isAuthenticated
}
from
"../../../utils"
;
export
default
{
Query
:
{
getRoomByName
:
async
(
_
,
args
,
{
request
})
=>
{
isAuthenticated
(
request
);
const
{
roomName
}
=
args
;
return
prisma
.
room
.
findOne
({
where
:
{
name
:
roomName
,
},
});
},
},
};
back/src/api/Room/getRooms/getRooms.graphql
deleted
100644 → 0
View file @
b48a05a
type Query {
getRooms: [Room]
}
back/src/api/Room/getRooms/getRooms.js
deleted
100644 → 0
View file @
b48a05a
import
{
prisma
}
from
"../../../utils"
;
export
default
{
Query
:
{
getRooms
:
async
()
=>
{
return
prisma
.
room
.
findMany
();
},
},
};
Please
register
or
login
to post a comment