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-05-25 00:34:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6c768bf2e89c68f5b07968bc7285b6df9c962519
6c768bf2
1 parent
42294808
create getRoomByName resolver
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
back/src/api/Room/getRoomByName/getRoomByName.js
back/src/api/Room/getRoomByName/getRoomByName.js
0 → 100644
View file @
6c768bf
import
{
prisma
,
isAuthenticated
}
from
"../../../utils"
;
export
default
()
=>
{
Query
:
{
getRoomByName
:
async
(
_
,
args
,
{
request
})
=>
{
isAuthenticated
(
request
);
const
{
roomName
}
=
args
;
return
prisma
.
room
.
findOne
({
where
:
{
name
:
roomName
,
},
});
};
}
};
Please
register
or
login
to post a comment