forked from pokers/backend_template
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathonelinerService.js
More file actions
38 lines (30 loc) · 875 Bytes
/
onelinerService.js
File metadata and controls
38 lines (30 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const {
OnelinerDao
} = require("../dao/onelinerDao");
const validator = require('validator')
const { InvalidUUID, AccountNotFound, MyBookNotFound } = require('./errorService');
class OnelinerService {
constructor(){
this._serviceName = 'onelinerService'
}
get serviceName(){
return this._serviceName
}
async postOneliner(userId, book_id, title, authors, oneliner, color, top, left, font, font_size, bg_image_url){
const onelinerDao = new OnelinerDao()
const onelinerRows = await onelinerDao.postOneliner(
userId,
book_id,
title,
authors,
oneliner,
color,
top,
left,
font,
font_size,
bg_image_url)
return onelinerRows
}
}
module.exports = { OnelinerService };